beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 155

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 155 of 234

December 13, 2011

CALL 68: Determining the Length of a String

CALL 68 returns the length of a string:

PUSH [A]
PUSH [B]
CALL 68

Where:
A = string number
B = string A length (number of characters)

Example:

Ready
>list
10 STRING 100, 10
20 $ ( 1) = "1234567"
30 PUSH 1: CALL 68: POP L
40 PRINT "The string length of $(1) is", L
50 END
Ready
>run
The string length of $(1) is 7
Ready
>