                               MBASIC TIP
                                   by
                             Steve Brammer

For those of you who, like myself, do frequent programming in MBASIC, an
occasion often arises where the ability to display a message on the
screen in a given row and column would be very convenient.  However, to
the best of my knowledge, MBASIC does not have a "LOCATE", "HTAB" or
"VTAB" command.  Recently, I found a definable function which would
solve the dilemma.  (Actually, someone else found it and showed it to
me.) When you try the program below, keep in mind that I have only tried
this on a Kaypro with MBASIC and not on any other machine!

 10 DEF FNLOC$(X,Y)=CHR$(27)+CHR$(61)+CHR$(X+31)+CHR$(Y=31)
 20 PRINT CHR$(26):REM CLEARS THE SCREEN
 30 PRINT FNLOC$(10,5);"TEST LINE"
 40 END

Line #10 defines the function to position the message.  Line #30
displays the message, "TEST LINE", at row=10 and column=5.

I hope this tip will help you, and if you know any tips yourself, be
sure to write to the newsletter editor about them.

Article from The Random File July 1985
