Post Reply 
[Newbie] output a variable on the screen
05-23-2020, 05:11 AM
Post: #1
[Newbie] output a variable on the screen
Hi all,

I'm approaching the Prime that I buy just a week ago (nice!). I'm trying to do my first program: simply a counter by 1, showing the results on the screen for 1 second.

If I use the PRINT command, Prime open a terminal and show my results in the upper left of the screen. But I want that the silly counter shows the output on the center of screen. I must use TEXTOUT? But (as I have understand) that command is used primarly to show text in a plot, and I don't need this (for now).

More in general: I've found here a list of commands with a short explanation of the meaning of each commands, but this is not so useful for programming purpose, because it's not ordered by the type of command (branches, loops, input/output...), and don't show all the help but only the first words. There is a more complete and well-structured list of commands?

Thank you, and sorry for my poor English and my newbiness :-)
Find all posts by this user
Quote this message in a reply
05-23-2020, 02:02 PM
Post: #2
RE: [Newbie] output a variable on the screen
I would use TEXTOUT_P command for this purpose, but you might also find the MSGBOX command useful.

-Dale-
Find all posts by this user
Quote this message in a reply
05-24-2020, 06:31 AM (This post was last modified: 05-24-2020 06:32 AM by pinkman.)
Post: #3
RE: [Newbie] output a variable on the screen
You need TEXTOUT_P.
Check this example here: https://www.hpmuseum.org/forum/thread-14999.html

And welcome here!
Find all posts by this user
Quote this message in a reply
05-24-2020, 11:40 AM
Post: #4
RE: [Newbie] output a variable on the screen
(05-24-2020 06:31 AM)pinkman Wrote:  You need TEXTOUT_P.
Check this example here: https://www.hpmuseum.org/forum/thread-14999.html

And welcome here!

Many thanks!
Find all posts by this user
Quote this message in a reply
05-25-2020, 05:28 AM
Post: #5
RE: [Newbie] output a variable on the screen
Hello,

PRINT as you said, prints text in a terminal like output. The advantages is that you can use it in the same way you use printf in C or writeln in pascal. An easy way to spew out text from your program.

TEXTOUT_P is a "graphical" writing on the screen, at any position, with the ability to control exactly how the text is written. it is a graphical function in the sense that it renders the text into pixels with precise control from the programmer and can then be placed exactly where the programer wants..

MSGBOX is a way to display a result or something like this, with some flourish. and wait for the user to "validate" It is the equivalent of a windows pop-up...

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.
Find all posts by this user
Quote this message in a reply
05-27-2020, 07:27 PM
Post: #6
RE: [Newbie] output a variable on the screen
(05-24-2020 11:40 AM)Franco_64 Wrote:  
(05-24-2020 06:31 AM)pinkman Wrote:  You need TEXTOUT_P.
Check this example here: https://www.hpmuseum.org/forum/thread-14999.html

And welcome here!

Many thanks!

In general, if there is a "graphical" command that involves drawing onto the screen, such a command comes in two flavors: COMMAND, and COMMAND_P where the "_P" suffix denotes pixel-level coordinates. Otherwise, you will have to rely on the current user's settings to determine where to draw (which can be a headache especially if their settings change a lot or do not match up with your expected values).

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 




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