Rockwell-automation 1771-DB Basic Module User Manual - Series A Manual de usuario Pagina 121

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 167
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 120
Operating Functions
Chapter 5
5–84
5.10.3.6
Replace a String in a String – CALL 65
This routine replaces a string within a string. Three arguments are
expected. The first argument is the string number of the string which
replaces the string identified by the second argument string number. The
third argument is the base string’s string number. There are no return
arguments.
u10 REM SAMPLE OF REPLACE STRING IN STRING
u20 STRING 1000,20
u30 $(0)=“RED-LINES”
u40 $(1)=“RED”
u50 $(2)=“BLUE” u60 PRINT “BEFORE: $0=”,$(0)
u70 PUSH 2 :REM STRING NUMBER OF THE STRING TO REPLACE WITH
u80 PUSH 1 :REM STRING NUMBER OF THE STRING TO BE REPLACED
u90 PUSH 0 :REM BASE STRING NUMBER
u100 CALL 65 :REM INVOKE REPLACE STRING IN STRING ROUTINE
u110 PRINT “AFTER: $0=”,$(0)
u120 END
RUN
BEFORE: $=RED-LINES
AFTER: $0=BLUE-LINES
READY
5.10.3
String Support Calls
(continued)
Vista de pagina 120
1 2 ... 116 117 118 119 120 121 122 123 124 125 126 ... 166 167

Comentarios a estos manuales

Sin comentarios