Printing

Post Reply
Tffsnyder
Posts: 7
Joined: Mon Nov 27, 2017 8:23 pm
My devices: iPad pro
Flag: United States of America

Printing

Post 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?

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Printing

Post 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.
The only thing that gets me down is gravity...

Post Reply