HP Forums
AVars and the program compile operation - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: AVars and the program compile operation (/thread-4811.html)



AVars and the program compile operation - Bob Frazee - 09-27-2015 01:39 AM

Can anyone explain the program compile operation in detail? After making an edit (in this case, activate a DelAVars instruction), I use 'check' which returns no errors found. I will exit the editor, power the calculator down, then up, try to run the App and it won't run. It ends up being a convoluted affair to get it running again. It appears the compile operation does not do a complete compile of the App when the 'check' operation is performed. Any information would be appreciated.
Thanks
rcf


RE: AVars and the program compile operation - komame - 09-27-2015 09:32 AM

Could you paste all your program here?
This will make it easier to diagnose your problem.

BR,
Piotr Kowalewski


RE: AVars and the program compile operation - cyrille de brébisson - 09-28-2015 06:42 AM

Hello,

Check does a compile, but does nothing with the result.

Exiting the program editor is what really compiles the program.

After compilation, every expression in the program of the form [exported] var:=value; or every CAS object gets evaluated, this initialized the global variables and cas variables (remember in CAS a function is a variable).
Normally, at this point, views, exported functions and user key get 'marked' so that they can be executed when needed.
The source code is also saved to file.

When the calc reboots, it normally loads the program descriptor. A short part of the program file which only contains the name of the variables/functions, what is a user key or a view.
Then if you try to USE one of these things, then and only then, does it load the program and silently recompile it (it only saves the source code).
If for some reason this descriptor is incorrect, then things might not work properly. The best thing to do then is to edit the program, change one char and exit.

If that does not work, you most likely have something wrong in the program.

Cyrille