Creation of Strings
"abc" : -> MonStgElt
BinaryString(s) : MonStgElt -> BStgElt
s cat t : MonStgElt, MonStgElt -> MonStgElt
s cat:= t : MonStgElt, MonStgElt -> MonStgElt
&cat s : [ MonStgElt ] -> MonStgElt
s ^ n : MonStgElt, RngIntElt -> MonStgElt
s[i] : MonStgElt, RngIntElt -> MonStgElt
s[i] : BStgElt, RngIntElt -> RngIntElt
ElementToSequence(s) : MonStgElt -> [ MonStgElt ]
ElementToSequence(s) : BStgElt -> [ BStgElt ]
Substring(s, n, k) : MonStgElt, RngIntElt, RngIntElt -> MonStgElt
Integer-Valued Functions
# s : MonStgElt -> RngIntElt
Index(s, t) : MonStgElt, MonStgElt -> RngIntElt
Character Conversion
StringToCode(s) : MonStgElt -> RngIntElt
CodeToString(n) : RngIntElt -> MonStgElt
StringToInteger(s) : MonStgElt -> RngIntElt
StringToInteger(s, b) : MonStgElt, MonStgElt -> RngIntElt
StringToIntegerSequence(s) : MonStgElt -> [ RngIntElt ]
IntegerToString(n) : RngIntElt -> MonStgElt
IntegerToString(n, b) : RngIntElt, RngIntElt -> MonStgElt
Boolean Functions
s eq t : MonStgElt, MonStgElt -> BoolElt
s ne t : MonStgElt, MonStgElt -> BoolElt
s in t : MonStgElt, MonStgElt -> BoolElt
s notin t : MonStgElt, MonStgElt -> BoolElt
s lt t : MonStgElt, MonStgElt -> BoolElt
s le t : MonStgElt, MonStgElt -> BoolElt
s gt t : MonStgElt, MonStgElt -> BoolElt
s ge t : MonStgElt, MonStgElt -> BoolElt
Example IO_Strings (H3E1)
Parsing Strings
Split(S, D) : MonStgElt, MonStgElt -> [ MonStgElt ]
Example IO_Split (H3E2)
Regexp(R, S) : MonStgElt, MonStgElt -> BoolElt, MonStgElt, [ MonStgElt ]
Example IO_Regexp (H3E3)
The print-Statement
print expression;
The printf and fprintf Statements
printf format, expression, ..., expression;
Example IO_printf (H3E4)
Example IO_printf2 (H3E5)
fprintf file, format, expression, ..., expression;
Example IO_printf (H3E6)
Verbose Printing (vprint, vprintf)
vprint flag: expression, ..., expression;
vprintf flag: format, expression, ..., expression;
Automatic Printing
ShowPrevious() : ->
ShowPrevious(i) : RngIntElt ->
ClearPrevious() : ->
SetPreviousSize(n) : RngIntElt ->
GetPreviousSize() : -> RngIntElt
Example IO_auto-print (H3E7)
Indentation
IndentPush() : ->
IndentPop() : ->
Printing to a File
PrintFile(F, x) : MonStgElt, Any ->
WriteBinary(F, s) : MonStgElt, BStgElt ->
PrintFile(F, x, L) : MonStgElt, Any, MonStgElt ->
PrintFileMagma(F, x) : MonStgElt, Any ->
Printing to a String
Sprint(x) : Elt -> MonStgElt
Sprintf(F, ...) : MonStgElt, ... -> MonStgElt
Example IO_Sprintf (H3E8)
Redirecting Output
SetOutputFile(F) : MonStgElt ->
UnsetOutputFile() : ->
HasOutputFile() : -> BoolElt
Opening Files
Open(S, T) : MonStgElt, MonStgElt -> File
Operations on File Objects
Flush(F) : File ->
Tell(F) : File -> RngIntElt
Seek(F, o, p) : File, RngIntElt, RngIntElt ->
Rewind(F) : File ->
Put(F, S) : File, MonStgElt ->
Puts(F, S) : File, MonStgElt ->
Getc(F) : File -> MonStgElt
Gets(F) : File -> MonStgElt
IsEof(S) : MonStgElt -> BoolElt
Ungetc(F, c) : MonStgElt, File -> MonStgElt
Example IO_LineCount (H3E9)
Reading a Complete File
Read(F) : MonStgElt -> MonStgElt
ReadBinary(F) : MonStgElt -> BStgElt
Example IO_Read (H3E10)
Pipe Creation
POpen(C, T) : MonStgElt, MonStgElt -> File
Pipe(C, S) : MonStgElt, MonStgElt -> MonStgElt
Example IO_GetTime (H3E11)
Operations on Pipes
Read(P : parameters) : IO -> MonStgElt
ReadBytes(P : parameters) : IO -> SeqEnum
Write(P, s) : IO, MonStgElt ->
WriteBytes(P, Q) : IO, SeqEnum ->
Socket Creation
Socket(H, P : parameters) : MonStgElt, RngIntElt -> IOSocket
Socket( : parameters) : -> IOSocket
WaitForConnection(S) : IO -> IO
Socket Properties
SocketInformation(S) : IO -> Tup, Tup
Socket Predicates
IsServerSocket(S) : IO -> BoolElt
Socket I/O
Read(S : parameters) : IO -> MonStgElt
ReadBytes(S : parameters) : IO -> SeqEnum
Write(S, s) : IO, MonStgElt ->
WriteBytes(S, Q) : IO, SeqEnum ->
Example IO_Sockets (H3E12)
Interactive Input
read identifier;
readi identifier;
Loading a Program File
load "filename";
iload "filename";
Saving and Restoring Workspaces
save "filename";
restore "filename";
Logging a Session
SetLogFile(F) : MonStgElt ->
UnsetLogFile() : ->
SetEchoInput(b) : BoolElt ->
Memory Usage
GetMemoryUsage() : -> RngIntElt
GetMaximumMemoryUsage() : -> RngIntElt
ResetMaximumMemoryUsage() : ->
System Calls
Alarm(s) : RngIntElt ->
ChangeDirectory(s) : MonStgElt ->
GetCurrentDirectory() : ->
Getpid() : ->
Getuid() : ->
System(C) : MonStgElt -> RngIntElt
%! shell-command
Creating Names
Tempname(P) : MonStgElt -> MonStgElt
[Next][Prev] [Right] [____] [Up] [Index] [Root]
Version: V2.19 of
Wed Apr 24 15:09:57 EST 2013