Argox PA-20 Basic Programming Manual Manual de usuario Pagina 24

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 143
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 23
PT-Basic Programming Manual Ver. 1.00 23/143
3.4 Commands for string processing
LEN
Purpose
To return the length of a string.
Syntax
A% = LEN(S$)
Example
Str$="ABCDEFGHIJK"
L% = LEN(Str$)
PRINT "Len. = ",L%
Description
A% is an integer variable to be assigned to the result.
S$ may be a string variable, string expression, or string
constant.
INSTR
Purpose
To search if one string exists inside antoher one.
Syntax
A% = INSTR([N%,] S1$, S2$)
Example
Str$="ABCGEFGHIJK"
G$="GH"
PRINT INSTR(5,Str$, G$)
PRINT INSTR(3, Str$, "CGE")
Description
A% is an integer variable to be assigned to the result.
N% is a numeric expression. Optional offset N% sets the
position for starting the search.
S1$, S2$ may be a string variable, string expression, or string
constant.
If S2$ is found in S1$, it returns the position of the first
occurrence of S2$ in S1$, from the starting point.
If N% is larger than the length of S1$ or if S1$ is null, of if
S2$ cannot be found,it return 0.
If S2$ is null,it return N%(or 1 if N% is not specified).
Vista de pagina 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 ... 142 143

Comentarios a estos manuales

Sin comentarios