Lesson 2: The Disp command
by Anthony Bush
Moving right along, we come across the 'Disp' command.
This command is located under [PRGM]:I/O:3. The 'Disp' command displays
values or text onto the home screen. So, edit your "HELLO" program,
and press [PRGM], the right arrow key, and 3. Now you should see
":Disp " in your program. This simply displays the home screen (i.e.
if the screen was showing a graph, this command would change it so that
the home screen would be showing). Now if you want to actually put
text on the screen you must enter a quote, then text, then another quote.
Add the quote ([ALPHA]:[+]), and type in "HELLO WORLD". Since we
are putting text on the screen it would be a good idea to clear it first.
To insert a line before another line (i.e. blank line before "Disp" line)
simply press [2nd]:DEL and then [ENTER]. Now move the cursor up to
the new line and insert a "ClrHome" command. This can be found under
[PRGM]:I/O:8. So your program should now read:
:Clrhome
:Disp "HELLO WORLD"
Now run the program. You should see:
HELLO WORLD
Done.
Edit the program and add Disp 1+2 on the third line, and Disp "1+2" on the fourth line. Should look like this:
:ClrHome
:Disp "HELLO WORLD"
:Disp 1+2
:Disp "1+2"
Run the program again (exit to home screen and press enter). Home screen shows:
HELLO WORLD
3
1+2
Done.
First lets take a look at the Disp "1+2" command. It displayed the stuff in between the quotes just like "HELLO WORLD". The
Disp 1+2 command added 1 and 2 together and the display the answer in on the far right side of the screen just like when you
make a calculation. So, you can conclude that when using quotes it will display what is between the quotes and when not using
quotes it will solve the equation and display the answer to the far right side of the screen.
Summary:
In Lesson 2 you should have learned the difference between Disp, Disp "1+2", and Disp 1+2 is.
Previous Lesson | Home | Next lesson