SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-93
SCAN
Considerations
If you use the window editor to load a file into a window through the Seedit GET
command, that window contains a copy of the file. When you enable edit mode, the
window heading includes the file name of the file copied into that window.
When you enter SAVE with no file name and without the [!] option, you replace or
purge the original file with the modified cache copy of the file to be saved. The cache
copy of the file is only a copy and not the actual file. Type ESCAPE to exit edit mode
without saving the cache to a file. However, you can reenable edit mode and perform a
subsequent save.
Example
This example shows the SAVE statement issued from a SeeView script.
This example shows a SAVE statement are issued from a window in edit mode. S is an
abbreviation for SAVE only when it is entered from the sill of an edit-mode window.
SCAN
The SCAN statement finds a target string in a string expression or scans a string
expression while a certain character exists.
BACK
specifies that the string is scanned backward, from right to left. Not specifying
BACK causes the string to be scanned from left to right (the default).
scan-string
specifies a string expression that represents the string to be scanned. If scan-
string is a string variable, you can follow it with a simple index to indicate where
the scan starts. Thus SCAN #s[5] UNTIL "." indicates that the scan for the period
character is to start with the fifth character in the scan string #s. You can also
TASK comint:=$system.system.comint;
DELETE comint!;
WRITE comint,"status *,term";
WRITE comint," "; {force SeeView to wait for all of the response
SAVE junk.myterm!,comint;
SAVE ? { display name of cache copy of file (if defined)
SAVE { save cache copy of file to file (purges old file)
S { (same meaning as above)
S! { (same meaning as above)
SAVE X { saves cache text to file X (if X does not exist)
SAVE X! { saves cache text to file X (and purges X if it exists)
SCAN [ BACK ] scan-string UNTIL target-string -> int
WHILE target-char -> int