Post Reply 
HP71B/75: How to use SUB, ENDSUB, CALL
09-10-2016, 03:43 AM (This post was last modified: 09-10-2016 03:44 AM by Garth Wilson.)
Post: #3
RE: HP71B/75: How to use SUB, ENDSUB, CALL
A nice thing about SUBprograms is that they have local environments, so they don't step on identically named variables, etc. from other programs or subprograms that might be pending. A subprogram can even call itself recursively, up to 63 levels deep IIRC, and each level will have its own environment. The subprogram does not have to be in the same program file; and if there might be two or more subprograms with the same name, you can specify where to look to find the right one. The CALL can also be indirect, with the subprogram's name being in a string. It's really quite powerful. The list in input and output parameters can be quite long. This is all 71 stuff. I don't know if the 75 differs.

http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, http://wilsonminesco.com/links.html )
Visit this user's website 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 - Garth Wilson - 09-10-2016 03:43 AM



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