Rockwell-automation 1771-DB BASIC MODULE Manual de usuario Pagina 255

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 394
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 254
Chapter
Call Routines 0–68
12
12 -65
Use this routine to insert a string within another string.
Input and Output Arguments
This routine has three input arguments and no output arguments. The first
argument is the position at which to begin the insert. The second argument
is the string number of the characters you want to insert into the base
string. The third argument is the string number of the base string.
Syntax
PUSH position to begin insert
PUSH
string number of characters to be inserted
PUSH
base string number
CALL
66
Example
>
10 REM SAMPLE ROUTINE TO INSERT A STRING IN A STRING
>
20 STRING 500,15
>
30 $(0)+“1234590”
>
40 $(1)+“67890”
>
50 PRINT “BEFORE: 0$=”,$(0)
>
60 PUSH 6 :REM POSITION TO START THE INSERT
>
70 PUSH 1 :REM STRING NUMBER OF STRING TO INSERT
>
80 PUSH 0 :REM BASE STRING NUMBER
>
90 CALL 66 :REM INVOKE INSERT A STRING IN A STRING
>
91 REM: REM ROUTINE
>
100 PRINT “AFTER: 0$=”,$(0)
>
110 END
>RUN
BEFORE: 0$=1234590
AFTER: 0$=123456789090
CALL 66: Insert String in a
String
Vista de pagina 254
1 2 ... 250 251 252 253 254 255 256 257 258 259 260 ... 393 394

Comentarios a estos manuales

Sin comentarios