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

  • 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 255
Chapter
Call Routines 0–68
12
12 -66
Use this routine to delete a string from within another string.
Important: This routine deletes only the first occurrence of the string.
Input and Output Arguments
This routine has two input arguments and no output arguments. The first
argument is the base string number. The second is the string number of the
string you want to delete from the base string.
Syntax
PUSH base string number
PUSH
string number of string to be deleted from base string
CALL
67
Example
>
10 REM ROUTINE TO DELETE A STRING IN A STRING
>
20 STRING 200,14
>
30 $(1)=“123456789012”
>
40 $(2)=“12”
>
50 PRINT “BEFORE: $1=”,$(1)
>
60 PUSH 1 :REM BASE STRING NUMBER
>
70 PUSH 2 :REM STRING NUMBER OF STRING TO BE DELETED
>
80 CALL 67: REM INVOKE STRING DELETE ROUTINE
>
90 PRINT “AFTER: $1=”,$(1)
>
100 END
>RUN
BEFORE: $1=123456789012
AFTER: $1=3456789012
CALL 67: Delete String
from a String
Vista de pagina 255
1 2 ... 251 252 253 254 255 256 257 258 259 260 261 ... 393 394

Comentarios a estos manuales

Sin comentarios