SeeView Manual

SeeView Language Elements
HP NonStop SeeView Manual526355-004
5-15
String Assignment
These examples show integer assignment statements:
String Assignment
String assignment statements begin with the string type flag character #. To
concatenate strings, use the & (ampersand) character. To parse tokens, use the string
operators #TAKE, #DROP, and #TRIM. You can index string variables on either side of
the statement. For more information on string assignment, see the description for the
Pound Sign # on page 9-144.
These examples show string assignment statements.
String Intrinsics
String intrinsics are built-in read-only variables that return string values intrinsic to the
SeeView environment. Begin string intrinsics with the string type flag (#) and follow
them with any of the string intrinsic keywords described under String Operators and
String Intrinsics on page 9-148, for the string assignment statement.
String intrinsics provide information about the environment such as:
The current date and time (#DATE, #TIME)
The size and location of a menu just invoked (#MENUWIDTH, #MENUHEIGHT,
#MENULINE, #MENUCOL)
The cursor location when the Return key was last pressed (#FKEYCOL,
#FKEYLINE)
The attributes of the task defined to SeeView through the WITH statement
(#TASKSTOPPED, #TASKPROMPTING, #TASKPAGENO, #TASKOBJECTNAME)
LET x := y+z; { This is an integer assignment statement.
x := y+z; { This is also an integer assignment statement.
IF x:= y+z THEN { This also assigns x to the sum of y + z.
{ and executes statements after the THEN if x <> 0.
#s := "Year 19" & #TAKE #DATE; { #s = "Year 1988"
#s[6] := "2001"; { #s = "Year 2001"
#s := "Five Factorial=" & 1*2*3*4*5; { #s = "Five Factorial=120"
SCAN #s until "=" ->x; { x is 15 (index of the =)
SCAN BACK #s[#size #s] UNTIL "F" -> x; { x is 6 (index of F)