•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The GFA-Basic Compendium
Author      : GFA Systemtechnik GmbH
Version     : GFABasic.HYP v2.98 (12/31/2023)
Subject     : Documentation/Programming
Nodes       : 899
Index Size  : 28056
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Document not found
@help       : Help
@options    : +g -i -s +z
@width      : 75
@hostname   : STRNGSRV
@hostname   : CAB     
@hostname   : HIGHWIRE
@hostname   : THING   
View Ref-FilePRINT [expression]
PRINT AT(column,line) [expression]
WRITE [expression]
LOCATE column,line

expression: arbitrary combination of sexp or aexp
column, line: iexp

The instruction PRINT, without parameters, causes a blank line to be printed.
If the cursor happens to be on the last line, the entire screen is scrolled up
one line. PRINT followed by an expression causes the expression to be printed
at the current cursor position. Text strings must be enclosed in quotes. If the
expression to be printed consists of several elements (constants, variables, or
expressions), the individual parts must separated by a semicolon, comma, or
apostrophe, with the following effects:

∙ A comma causes the cursor to move to one position past the next column number
  which is divisible by 16. In other words, the columns 1, 17, 33, etc. are
  used. If this takes the cursor beyond the end of the line, the cursor moves
  to column 1 of the next line.

∙ A semicolon causes the output of the corresponding elements, one after the
  other without any spaces being added.

∙ An apostrophe inserts one space between the appropriate elements.

PRINT AT() makes it possible for the expression to be displayed on a specified
line, starting at a specified column. Depending on the current screen
resolution, up to 80 columns and 25 lines are available.

Note: Column and line numbers begin at 1, and not 0.

If a window is open, the column and line numbers are relative to the top
left-hand corner of the window.

If the output expression (the message) is not terminated with a semicolon, the
cursor is placed at the beginning of the next line. If it was already at the
bottom of the screen, then the screen is scrolled up by one line.

If print control characters (ASCII characters from 0 to 31) are specified, then
these are processed by the VT-52 Emulator (see Appendix).

The WRITE command can be used to send output to the screen. The command is
followed by the numerical or string expressions to be sent, separated by
commas. The output includes the commas and, with string expressions,
the quotation marks are also included. A semicolon may be placed after the last
item to be output, in which case the usual Carriage Return/Line Feed will be
suppressed.

LOCATE places the cursor at the specified column and line, i.e. in the
same order as PRINT AT(). It will not, however, actually display
anything. See VTAB and HTAB.

Examples:

    a$="GFA Systemtechnik"
    PRINT LEFT$(a$,4)+"BASIC"'1+2;
    PRINT ".0","GFA ";UPPER$(MID$(a$,5))

--> Displays 'GFA BASIC 3.0' and 'GFA SYSTEMTECHNIK'.

    PRINT AT(5,8);"Fifth column, eighth line"

--> Prints the message starting at the position x=5, y=8.

    LOCATE 5,8
    PRINT "Eighth line, fifth column"

--> Positions the cursor at the fifth column of the eighth line and
    displays the message, again x=5 and y=8.

    WRITE 1+1,"Hello",3*4

--> The output is: '2,"Hello",12'.

Memo: The manual originally documented LOCATE with the parameters
      reversed. However it actually works like so: LOCATE x,y

      Internally PRINT is really a BIOS call to bconout(DEV_CON).
      LOCATE is really a BIOS call to bconout(VT-52 ESC+Y)
      PRINT AT() is convert to a call to LOCATE.

Bconout()+, Cconws()+, v_curtext()+, vs_curaddress()+