SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-148
String Operators and String Intrinsics
Example
This example shows how to use the pound sign script symbol.
String Operators and String Intrinsics
This section describes string operators and string intrinsics in detail.
String Operators
String operators work on string variables and string intrinsics. They either return
information or operate on the string variable or string intrinsic.
#ALPHA #string-var [ index-range ]
returns 1 if the first character of #string-var is a…z or A…Z.
#CHAR expression
returns the right byte of an integer expression as a type string. This example
displays ASCII characters 32 .. 95:
VAR i:=-1, eof, done, {integer variables & flags
#s, {read line string variable
#sn, #name, #tos, {system num, name, & tos strings
w:=16, pg:=1, {system info width & display page
max:=(80/w*24-1); {max systems per page
TASK netmon; {startup netmon with taskid = netmon
WRITE netmon,"cpus"; {do a "cpus"
FOR 3 DO READ netmon; {read heading, tossing it
DO BEGIN {begin page loop
PAGE pg; CLEAR;
DO BEGIN {begin processing network nodes
PLOT (i:=i+1)/24*w, i mod 24; {show nodes in tabular column form
READ netmon, #s, eof;
IF (#s[1] <> "-") THEN BEGIN
#sn := #TAKE #s; { sysno
#name := #TAKE #s[6:14]; { sysname
#tos := #TAKE #s[48:50]; { tos version
"" & #sn & " " & #name; { display system info
END;
END UNTIL eof OR (done:=(#s[1]="-")) OR (i >= max);
FLUSH;
LET i:=-1; LET pg:=pg+1;
END UNTIL eof OR done;
MSG "N e t w o r k N o d e N a m e s " & #DATE;
VAR i:=31;
FOR 3 DO BEGIN { show chars 32 .. 95
LINE i/32+1;
FOR 32 DO [ #char(i:=i+1) ];
END;