EXPORT command inconsistancies?
|
03-26-2017, 10:13 PM
Post: #1
|
|||
|
|||
EXPORT command inconsistancies?
If you remove all EXPORT commands in an App, the application will still run on both the hardware calculator and virtual calculator. In a "hpprgm", it will not run on either calculator. Is this the intended behavior that Apps behave differently than "hpprgm's with the EXPORT command?
|
|||
03-27-2017, 06:56 AM
Post: #2
|
|||
|
|||
RE: EXPORT command inconsistancies?
(03-26-2017 10:13 PM)Bob Frazee Wrote: If you remove all EXPORT commands in an App, the application will still run on both the hardware calculator and virtual calculator. In a "hpprgm", it will not run on either calculator. Is this the intended behavior that Apps behave differently than "hpprgm's with the EXPORT command? Apps programs never needed to be exported. Exporting them only provides users with a means to directly access the programs that would normally be accessed via the app buttons (Num, Plot, Symb, View, etc.). By redefining those functions/keys, you have essentially provided an alternate means of accessing the app's programs. Think of an app program as a special kind of "user keys" that basically replace the Num, NumSetup, Plot, PlotSetup, etc. keys. Graph 3D | QPI | SolveSys |
|||
03-27-2017, 06:56 AM
Post: #3
|
|||
|
|||
RE: EXPORT command inconsistancies?
Can you explain better what you mean?
I tried to remove the EXPORT command I have in a solve application with custom variable names but it gives a syntax error. I also tried to change it to LOCAL, it does not give error during check but gives syntax errors in the symbolic view. Both errors are right, the Prime behaves correctly in this case. Can you post an example where it behaves different? |
|||
03-27-2017, 07:03 AM
Post: #4
|
|||
|
|||
RE: EXPORT command inconsistancies?
(03-27-2017 06:56 AM)retoa Wrote: Can you explain better what you mean? I think Bob was referring to (sub)programs, not variables. The syntax errors in the symbolic view are due to the fact that local (i.e. non-exported) variables are not visible to anything outside the scope of either the (sub)program that defined them, or the source file in which they were declared. Graph 3D | QPI | SolveSys |
|||
03-28-2017, 12:49 AM
Post: #5
|
|||
|
|||
RE: EXPORT command inconsistancies?
Han wrote from Post 4:
"I think Bob was referring to (sub)programs, not variables." Han is correct, I was not referring to variables. I meant that in an App, the EXPORT command that gives the App global visibility, can be removed, and still be able to run the App. If the global visibility EXPORT command is removed from a "hpprgm", I cannot run the program." The inconsistency (to me), is the removal of the global visibility EXPORT command will still allow the App to run, but prevents the "hpprgm" from running. |
|||
03-28-2017, 05:52 AM
Post: #6
|
|||
|
|||
RE: EXPORT command inconsistancies?
Hello,
EXPORT is a keyword that let the system know that a given symbol in a program (function or global variable) need to be directly accessible by the user. An app that has a program which global do not need to be accessible by the user does not need to use EXPORT. Since function designed to respond to app key events (symb, plot...) are not accessed directly by the user, but by the system, they do not need to be exported. in a non-app program, you need to have at least one exported function that the user can call/run... Note that as soon as the user fully qualifies a symbol, then there is no access restriction anymore and he can use anything, even not exported (from memory). cyrille Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)