Post Reply 
HP-71B BASIC Question
03-16-2021, 12:53 AM (This post was last modified: 03-16-2021 01:22 AM by Sylvain Cote.)
Post: #1
HP-71B BASIC Question
I have created a program that have multiple sub-routines and I have a user defined function (UDF) that need to be called from the main body and from the sub-routines.
The manual and my tests told me that is not possible to call a UDF defined in the main body from a sub-routine.
I am currently obliged to define it multiple times, in the main body and in all sub-routines creating code duplication.
Do any of you have a work around ? (while still using UDF)

Code:
! main body
...
100  DEF FNB(S8)=IP(FP(S8/2^6)*2) ! mask 00100000
105  IF FNB(S)=1 THEN ...
...
500 SUB DECODE(S9,B9,E9,C9,L9)
505  DEF FNB(S8)=IP(FP(S8/2^6)*2) ! duplicate code
510  IF FNB(S9)=1 THEN ...
...
540 END SUB

edit: I am searching for something equivalent to the C++ scoping "::" operator that would allow me to call the UDF defined in main space from a sub-routine space
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-71B BASIC Question - Sylvain Cote - 03-16-2021 12:53 AM
RE: HP-71B BASIC Question - toml_12953 - 03-16-2021, 01:42 AM
RE: HP-71B BASIC Question - J-F Garnier - 03-16-2021, 09:34 AM
RE: HP-71B BASIC Question - Sylvain Cote - 03-17-2021, 02:28 PM
RE: HP-71B BASIC Question - Sylvain Cote - 03-17-2021, 07:30 PM
RE: HP-71B BASIC Question - toml_12953 - 03-18-2021, 07:56 AM
RE: HP-71B BASIC Question - Sylvain Cote - 03-18-2021, 11:02 AM
RE: HP-71B BASIC Question - J-F Garnier - 03-19-2021, 09:01 AM
RE: HP-71B BASIC Question - Sylvain Cote - 03-19-2021, 07:07 PM
RE: HP-71B BASIC Question - J-F Garnier - 03-20-2021, 09:23 AM
RE: HP-71B BASIC Question - Sylvain Cote - 03-20-2021, 01:03 PM
RE: HP-71B BASIC Question - Sylvain Cote - 03-22-2021, 10:31 PM
RE: HP-71B BASIC Question - J-F Garnier - 03-24-2021, 10:05 AM
RE: HP-71B BASIC Question - rprosperi - 03-24-2021, 12:40 PM
RE: HP-71B BASIC Question - J-F Garnier - 03-24-2021, 04:51 PM
RE: HP-71B BASIC Question - rprosperi - 03-24-2021, 07:36 PM



User(s) browsing this thread: 1 Guest(s)