Rockwell-automation 1746-BAS BASIC LANGUAGE Manual de usuario Pagina 251

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 280
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 250
Publication 1746-RM001A-US-P
String Functions 15-9
CALL 67 – Delete a
String in a String
Purpose
Use CALL 67 to delete a string from within another string. The CALL expects two
arguments. The first argument is the base string number. The second is the number
of the string deleted from the base string. This routine has no output arguments.
Syntax
PUSH [base string number]
PUSH [deleted string number]
CALL 67
Example
>1 REM EXAMPLE PROGRAM
>10 REM ROUTINE TO DELETE A STRING IN A STRING
>20 STRING 200,14
>30 $(1) = “123456789012”
>40 $(2) = “12”
>50 PRINT “BEFORE:”
>60 PRINT “$(1) = ”,$(1)
>70 PUSH 1 : REM BASE STRING NUMBER
>80 PUSH 2 : REM STRING NUMBER OF THE STRING DELETED
>90 CALL 67 : REM INVOKE STRING DELETE ROUTINE
>100 PRINT “AFTER:”
>110 PRINT “$(1) = ”,$(1)
>120 END
READY
>RUN
BEFORE:
$(1) = 123456789012
AFTER:
$(1) = 3456789012
READY
>
IMPORTANT
This routine deletes only the first occurrence of the string.
Vista de pagina 250
1 2 ... 246 247 248 249 250 251 252 253 254 255 256 ... 279 280

Comentarios a estos manuales

Sin comentarios