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-FileMID$(a$,x[,y])=b$ (as a command) a$: svar b$: sexp x, y: iexp MID$() used as an instruction makes possible the replacement of part of a string variable a$ with the string expression b$. So with MID$(a$,x,y)=b$, characters from b$ will overwrite those in a$, starting at the x-th character position of a$. The optional parameter y determines how many characters of b$ are used. If y is omitted, then as many characters as possible of a$ are replaced with those from b$. The length of a$ is unchanged, so that no characters will be written beyond the end of a$. Example: a$="GFA SYSTEMTECHNIK" MID$(a$,5)="BASIC " ' b$="Testword" MID$(b$,6,10)="are you serious?" PRINT a$, b$ --> 'GFA BASIC TECHNIK' and 'Testware' are printed.