Post Reply 
Programming error on the physical calculator only
08-31-2014, 02:40 PM (This post was last modified: 08-31-2014 02:58 PM by jebem.)
Post: #5
RE: Programming error on the physical calculator only
(08-31-2014 02:07 PM)gabrieljcs Wrote:  On another program I made I get odd errors too, e.g.:
Code:
EXPORT ...()
BEGIN
LOCAL R, S, T;  // error here
...
END;

Code:
EXPORT ...()
BEGIN
LOCAL R;  // no errors
LOCAL S;
LOCAL T;
...
END;

Sometimes it handles the commas (like my first post), sometimes it doesn't. What the hell?

EDIT: Maybe it's worth saying that I'm using Portuguese as language.

EDIT: I see that the correct answer was given by Tim.
I'm not sure what can cause that behavior, maybe some other folks here with a better understanding of this calculator can help you.

On my calculator I can define those variables from your specific example using the two syntax modes without issues.

You are declaring the built-in system global real variables (A,..,Z) in your code as local scope vars.
While this should not create any problems, can you try to use local variables defined with custom names like "Res" or "Sur" instead of "R" and "S" to see if it behaves differently?

Also, may I recommend these two small excellent articles from Han that may help here:
HP Prime Programming: Variable types and their priorities
HP Prime Programming: An Introduction

And Joe Horn has published a list of reserved names that should not be used to name user defined variables (just in case...):
Reserved Variables on the HP Prime

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming error on the physical calculator only - jebem - 08-31-2014 02:40 PM



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