HP-48G local variables within subroutine
|
05-17-2023, 07:22 AM
Post: #5
|
|||
|
|||
RE: HP-48G local variables within subroutine
(05-17-2023 01:58 AM)FLISZT Wrote: If this SUBRoutine is called by an other program then you have to use "compiled local variables". There is no reason to use compiled local variables here. If your subroutine was simply DIVMUL « a b / b DUP * » and you called it from another program that defined a and b, eg MAIN « → a b 'DIVMUL' » then you would need compiled local variables, because when creating DIVMUL, a and b are GLOBAL variables while when calling DIVMUL from MAIN they should be local. So, create DIVMUL as DIVMUL « ←a ←b / ←b DUP * » and MAIN as MAIN « → ←a ←b 'DIVMUL' » Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP-48G local variables within subroutine - grbrum - 05-16-2023, 11:41 PM
RE: HP-48G local variables within subroutine - FLISZT - 05-17-2023, 01:58 AM
RE: HP-48G local variables within subroutine - Werner - 05-17-2023 07:22 AM
RE: HP-48G local variables within subroutine - FLISZT - 05-17-2023, 07:51 AM
RE: HP-48G local variables within subroutine - grbrum - 05-17-2023, 03:21 AM
RE: HP-48G local variables within subroutine - FLISZT - 05-17-2023, 06:00 AM
RE: HP-48G local variables within subroutine - grbrum - 05-18-2023, 05:16 AM
RE: HP-48G local variables within subroutine - Boub65 - 05-17-2023, 02:09 PM
RE: HP-48G local variables within subroutine - 2old2randr - 05-17-2023, 10:33 PM
RE: HP-48G local variables within subroutine - BruceH - 05-18-2023, 09:12 PM
RE: HP-48G local variables within subroutine - FLISZT - 05-18-2023, 12:24 AM
RE: HP-48G local variables within subroutine - Thomas Klemm - 05-19-2023, 04:00 PM
|
User(s) browsing this thread: 4 Guest(s)