[Newbie] output a variable on the screen - 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: [Newbie] output a variable on the screen (/thread-15043.html) |
[Newbie] output a variable on the screen - Franco_64 - 05-23-2020 05:11 AM 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 :-) RE: [Newbie] output a variable on the screen - DrD - 05-23-2020 02:02 PM I would use TEXTOUT_P command for this purpose, but you might also find the MSGBOX command useful. -Dale- RE: [Newbie] output a variable on the screen - pinkman - 05-24-2020 06:31 AM You need TEXTOUT_P. Check this example here: https://www.hpmuseum.org/forum/thread-14999.html And welcome here! RE: [Newbie] output a variable on the screen - Franco_64 - 05-24-2020 11:40 AM (05-24-2020 06:31 AM)pinkman Wrote: You need TEXTOUT_P. Many thanks! RE: [Newbie] output a variable on the screen - cyrille de brébisson - 05-25-2020 05:28 AM 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 RE: [Newbie] output a variable on the screen - Han - 05-27-2020 07:27 PM (05-24-2020 11:40 AM)Franco_64 Wrote:(05-24-2020 06:31 AM)pinkman Wrote: You need TEXTOUT_P. 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). |