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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 167
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 123
Operating Functions
Chapter 5
5–87
5.10.3.9
Determine Length of a String – CALL 68
This routine determines the length of a string. One input argument is
expected. This is the string number on which the routine acts. One output
argument is required. It is the actual number of non-carriage return (CR)
characters in this string. This is similar to the BASIC command LEN(str$).
(Example: L=LEN($1)).
u10 REM SAMPLE OF STRING LENGTH
u20 STRING 100,10
u30 $(1)=“1234567”
u40 PUSH 1 :REM BASE STRING
u50 CALL 68 :REM INVOKE STRING LENGTH ROUTINE
u60 POP L :REM GET LENGTH OF BASE STRING
u70 PRINT “THE LENGTH OF ”,$(1),“ IS ”,L
u80 END
uRUN
THE LENGTH OF 1234567 IS 7
READY
The following sections list and describe the memory support calls you can
use with the BASIC Module. All strings, arrays and variables are shared.
5.10.3
String Support Calls
(continued)
5.1
1
Memory Support Calls
Vista de pagina 123
1 2 ... 119 120 121 122 123 124 125 126 127 128 129 ... 166 167

Comentarios a estos manuales

Sin comentarios