Monday, September 24, 2012

Use of LOCATE

Also during last week's class, I introduced use of the LOCATE command.

The proper format for LOCATE is LOCATE y, x, where y is the number of rows from the top of the output window and x is the number of spaces from the left margin. You'll probably want to develop the habit of beginning all of your output with the CLS command to clear the output window of any warning messages.

Instead of manipulating your output with PRINT statements and spaces like this

Positioning text with blank lines and spaces

You can simplify your code like this

Positioning text with LOCATE

Both with give you the same output - like this

Identical results