Up: GEOS SDK TechDocs | Up | Prev: stdpaths ... | Next: symbolCompletion ...

stream

stream open <file> (r|w|a|r+|w+)
stream read (line|list|char) <stream>
stream print <list> <stream>
stream write <string> <stream>
stream rewind <stream>
stream seek (<posn>|+<incr>|-<decr>|end) <stream>
stream state <stream>
stream eof <stream>
stream close <stream>
stream flush <stream>
stream watch <stream> <what> <procName>
stream ignore <stream>

Examples:

"var s [stream open kmap.def w]"
Open the file "kmap.def" for writing, creating it if it wasn't there before, and truncating any existing file.
"stream write $line $s"
Write the string in $line to the open stream.

This allows you to read, write, create, and otherwise manipulate files on the host machine from Swat.

See Also: protect, source, file.

switch

switch <thread-id>
switch [<patient>] [:<thread-num>]

Examples:

"switch 3730h"
Switches swat's current thread to be the one whose handle ID is 3730h.
"switch :1"
Switches Swat's current thread to be thread number 1 for the current patient.
"switch parallel:2"
Switches Swat's current thread to be thread number 2 for the patient "parallel"
"switch write"
Switches Swat's current thread to be thread number 0 (the process thread) for the patient "write"
"switch"
Switches Swat's current thread to be the current thread on the PC.

Switches between applications/threads.


Up: GEOS SDK TechDocs | Up | Prev: stdpaths ... | Next: symbolCompletion ...