Page 1 of 1

Printing

Posted: Tue Nov 28, 2017 4:01 am
by Tffsnyder
Sorry to burden anyone with 2 such beginner questions but, one) how do I position where the print command places numeric values on a nongraphic screen?

And two, How do I print a numeric value on a graphic screen?

Re: Printing

Posted: Tue Nov 28, 2017 7:00 am
by rbytes
Numeric values are just one category of text, so you use text commands to output them. The text screen command is PRINT. The graphics screen command is DRAW TEXT.

On a text screen, you don't have much control over where text (including numeric values) prints. If nothing has yet been printed on the text screen, your text will print at the top left of the screen.

Whatever you print with the PRINT command will normally appear at screen left. One trick that can be used to position text horizontally is to include leading spaces or tabs.

The PRINT command will print text one line below any previously-printed item - unless the previous command ended with a ; In that case, the next print output will appear on the same line, immediately after the previously-printed text.

On a graphics screen, using DRAW TEXT, you can position your text, including numeric values, very precisely using x (horizontal) and y (vertical) coordinates.