•  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-Filex=y

x: var
y: exp

The equals sign '=' can be used not only as a comparison operator, but also to
assign a value to a numeric or string variable. The value of the expression y
on the right of the equals sign is determined and assigned to the variable on
the left.

Numerical expressions can only be assigned to numerical variables, and
character string expressions can only be assigned to string variables.

Optionally, the command LET may be used, which also permits the assignment of
values to variables which have the same names as keywords.

Example:

    x=LEN("TEST")+3
    a$=GF+CHR$(65)
    PRINT x,a$

--> On the screen 7 and 'GFA' appear.

Hexadecimal, Binary, and Octal notation can also be used.

Notation     Prefix
Hexadecimal  &H
Binary       &X
Octal        &O

Example:

    LET test&=&H80       !hex notation
    LET test&=&X10000000 !bin notation
    LET test&=&O200      !oct notation

--> test& is assigned the value '128' in Hex, Bin, and Oct notation