SeeView Manual

SeeView Language Elements
HP NonStop SeeView Manual526355-004
5-16
String Operators
String Operators
String operators are built-in string functions that perform operations on string variables
and intrinsics.
String operators return the size of a string variable or intrinsic (for example, #SIZE #s).
They also perform token operations on a string, such as TAKE, DROP, or TRIM tokens
in a string.
The TRIM function returns the first token in a string variable and removes that token
from the contents of the string variable. For example:
When you use lowercase, the system translates it to uppercase automatically.
String Tokens
A string token is a group of characters returned by either the #TAKE or #TRIM string
operators. These rules apply to a token:
If the first nonblank character is alphabetic, the token consists of that character and
all the following alphanumeric characters.
If the first nonblank character is numeric, the token consists of that character and
all the following numeric characters.
If the first nonblank character is special (neither alphabetic nor numeric), the token
is a one-character token.
Modal and Modeless Dialogue Boxes
SeeView scripts can prompt for information in either a modal or modeless manner.
The standard SeeView SeeShell environment is modeless. Modeless environments
allow disjoint functions and services to be offered together in an integrated manner,
rather than requiring you to hierarchically nest and navigate a variety of prompts,
screens, and windows. You are more productive because you can use other services
when you are prompted for information.
VAR #s := "one two three";
VAR #t;
#t := #TAKE #s; { #t = "ONE"
#t := #DROP #s; { #t = "TWO three"
#t := #TRIM #s; { #t = "ONE" #s = "TWO three"
#s:="one two three"; { s = "one two three"
DO BEGIN { This loop shows three
#t:= #TRIM #s; { Line 25 messages:
MSG #t; { "ONE", "TWO", "THREE"
END UNTIL #s=""; { Note: #s is null when done