MSP with input/output
MSPio is an extension of MSP with a simple input and output mechanism that
abstracts from interacting with the environment, and still is powerful
enough.
Additional instructions
read extfocus
- Deletes the first character (string of length 1) from the string in
focus
INPUT and puts it in extfocus.
Returns false on failure.
write "string"
- Appends
"string" to the string in focus
OUTPUT.
write extfocus
- Appends the string in
extfocus to the string in
focus OUTPUT.
Example
The following PGLEc.MSPio program copies
INPUT to
OUTPUT.
INPUT = "abcde";
L0;
+ read x {;
write x;
##L0;
}