•  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-FilePRED(a$)
SUCC(a$)

a$: sexp

PRED() returns the character with the ASCII code one less than the first
character of the specified string. (In other words, its PREDecessor in the
ASCII table.)

SUCC() returns the character with the ASCII code one greater than the first
character of the specified string. (In other words, its SUCCessor in the
ASCII table.)

These function are also effective with numbers, see the section on
'Integer Arithmetic' (PRED and SUCC).

PRED(a$) corresponds to the expression CHR$(ASC(a$)-1).
SUCC(a$) corresponds to the expression CHR$(ASC(a$)+1).

Example:

    character$="blue moon"
    predecessor$=PRED(character$)
    successor$=SUCC(character$)
    PRINT predecessor$;SUCC(predecessor$);successor$

--> 'abc' is displayed on the screen.