Post Reply 
HP71B/75: How to use SUB, ENDSUB, CALL
09-10-2016, 01:40 AM
Post: #2
RE: HP71B/75: How to use SUB, ENDSUB, CALL
(09-10-2016 12:16 AM)Eddie W. Shore Wrote:  Question for the HP 71B/75 experts:

How do I use SUB, END SUB, and CALL? Is it really any different from using GOSUB and RETURN using line numbers? Thanks.

Yes, the CALL sub is different. General syntax:

SUB <subname>(<list of parameters>)
<statements>
END SUB

CALL <subname>(<list of arguments>)

The data type (and scalar/array designations) of the argument list must match that of the parameter list.

Parameters that are arrays are passed by reference. Reference manual not clear about non-array parameters. Enclosing an argument in () makes it passed by value. Arrays must include () (such as A()). Two or more dimensional arrays must include commas to indicate the number of dimensions So , A(,) indicates that it is a matrix.

I encourage you to consult the HP-71B and HP75C/D documentation.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP71B/75: How to use SUB, ENDSUB, CALL - Namir - 09-10-2016 01:40 AM



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