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

  • 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 249
Chapter
Call Routines 0–68
12
12 -60
Use this routine to append one string to the end of another string.
If the resulting string is longer than the maximum string length, the append
characters are lost. This is a string concatenation assignment.
(Ex. $(1)=$(1)+$(2)).
Input and Output Arguments
This routine has two input arguments and no output arguments. The first
input argument is the string number of the string you want appended.
The second input argument is the string number of the base string.
Syntax
PUSH
string number of string to be appended
PUSH
string number of the base string
CALL
61
Example
>
10 STRING 200,20
>
20 $(1)=”How are ”
>
30 $(2)= “you?”
>
40 PRINT “BEFORE:”,
>
50 PRINT “$1=”,$(1),” $2=”,$(2)
>
60 PUSH 2 :REM STRING NUMBER OF STRING TO BE APPENDED
>
70 PUSH 1 :REM BASE STRING NUMBER
>
80 CALL 61 :REM INVOKE STRING CONCATENATION ROUTINE
>
90 PRINT “AFTER:”,
>
100 PRINT “$1=”,$(1),” $2=”,$(2)
>
110 END
>RUN
BEFORE:
$1=How are
$2=you?
AFTER:
$l=How are you?
$2=you?
CALL 61: String Append
(Concatenation)
Vista de pagina 249
1 2 ... 245 246 247 248 249 250 251 252 253 254 255 ... 393 394

Comentarios a estos manuales

Sin comentarios