cancel
Showing results for 
Search instead for 
Did you mean: 
  • ×
    Information
    Fix HP Printer issue in macOS

    A [software component] will damage your computer message displays when printing or while installing - Click Here

    Information
    Fix Windows 10 Update Issues

    Resolve Windows 10 or update issues on HP computer or printer– Click Here

  • post a message
  • ×
    Information
    Fix HP Printer issue in macOS

    A [software component] will damage your computer message displays when printing or while installing - Click Here

    Information
    Fix Windows 10 Update Issues

    Resolve Windows 10 or update issues on HP computer or printer– Click Here

  • post a message
Highlighted
New member
2 1 0 1
Message 1 of 6
1,226
Flag Post

Solved!

Default app variables Xmin, Xmax etc randomly available

HP Recommended
HP Prime G2

Hi.

 

I am trying to understand how to program on the HP Prime, but I am a bit baffled with the following. 

I am just trying to run some examples provided in the doc or in the calculator itself without changes (example program offered when creating a new one).

Some of them are referring to variables Xmin, Xmax etc , and depending on the context (if I have run some drawing apps  before or not , or if I cleared the contents of another app), either 

- All goes well 

- Or the editor signals a syntax error when leaving with the  Esc key,  and then the program manager refuses to run the app. 

 

Am I missing something?

 

For example (to replicate the same problem on an emulator on PC):

- Shift - 1 to go to Program section

- Click new - in the Example menu, choose Demo_FILLPOLY

- You land in the editor. Click escape to leave. HP verifies the syntax and claims "syntax error in program line 8".

 

Line 8 is:

Xmin := -15.9; Xmax := 15.9; Ymin := -10.9; Ymax = 10.9; // some comment

 

I would not have expected a manufacturer provided example program to be rejected as having a "syntax error". What I am supposed to do to make the example program work?

Tags (1)
5 REPLIES 5
Highlighted
HP Support Agent
HP Support Agent
19,321 19,280 843 897
Message 2 of 6
Flag Post
HP Recommended

@PDude
Thank you for posting on the HP Support Community.


If your HP Prime calculator stops responding for any reason, first verify that the batteries are sufficiently charged. If the calculator still does not respond, press and hold O while pressing @ to reset the calculator. If the calculator still does not respond, insert a pin into the reset hole on the back of the calculator and press lightly. Click here for more HP Prime Graphing Calculator Quick Start Guide

 

To reset a field to its default value, move the cursor to that field and press \. To reset all fields to their default values, press S& (Clear). Note that the reset options are available on all screens that show settings (not just the Home Settings screen). If settings are spread over more than one page, pressing S& (Clear) resets only the settings on the page that is currently displayed. To return to Home view, press H. Note that the CAS has its own settings

 

 

Hope this helps! Keep me posted for further assistance.
Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.

ECHO_LAKE
I am an HP Employee

Highlighted
Level 6
Level 6
252 251 42 77
Message 3 of 6
Flag Post
HP Recommended

Hello,

 

Sorry about that...

 

XMin and XMax are APP variables. Not every app has them because not every app has a need for a cartesian graphical screen.

 

This docuement does explain quite a lot of what is happening on Prime with variables and their accessibility.

 

Cyrille

I am an HP Employee
Tags (1)
Highlighted
Level 8
Level 8
746 743 121 184
Message 4 of 6
Flag Post
HP Recommended

And as to why it "does not always work", if you have a currently open application that does NOT have a graphing view associated with it, the application may not have Xmin and so on defined.

 

Switch to "function app", "parametric" or so on and go into your source again. It will work this time.

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
Highlighted
Level 9
3,551 3,490 180 537
Message 5 of 6
Flag Post
HP Recommended

Hi!, @PDude :

See, if this example from Eddie Shore, clarify your doubt ... https://www.youtube.com/watch?v=ArdXnE2b6RQ

Kind Regards !.
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
A short demonstration of the FILLPOLY command for the HP Prime graphing calculator. Syntax: Cartesian Version: FILLPOLY(points, color, alpha*) Pixel Version:...
Highlighted
Author
New member
2 1 0 1
Message 6 of 6
Flag Post
HP Recommended

OK. So from the document provided by Cyrille, the variable name context resolution includes looking up configuration variables of a "current open App". That App's name actually is visible on the top of the program List when when clicking Shift+1 [Program].

 

If indeed I select spreadsheet as the current App, that App has no graphical display, so defines no variables such as Xmin, Xmax, etc. And indeed, if I then try to run the program, the location referring to Xmin/Xmax throws a syntax error.

 

Is there a way to avoid the compilation and execution of a program being dependent on a "current App" setting.

 

I was actually assuming that the following line of code in the program:

 

StartApp("Function")

would force a reference to that App. That does not seem to be the case.

 

Is there any documentation in the HP programming manual that describes in detail the role of the "current App", and just the fact that its name is display on the top of the program list, as well as on App writing in general?

 

Many thanks.

 

 

Warning Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation