Other OS Operations

Other OS Operations

The following are miscellaneous operating system operations.

declare key value
Sets an interpreter option. The key direct-calls, when set to t, optimizes function calls on the assumption they will not be redefined as table. The key explicit-flush, when set to t, disables automatic flushing of output, requiring explicit flushout calls. Both are initializes to nil. New in arc3.
>(declare direct-calls t)
Error: _direct-calls: undefined;
 cannot reference an identi
fier before its definition
  in module: top-level
  internal
 name: _direct-calls

>(declare explicit-flush t)
Error: _explicit-flush: undefined;
 cannot reference an iden
tifier before its definition
  in module: top-level
  intern
al name: _explicit-flush

memory
Returns the current memory usage. New in arc3.
>(memory)
55065424
system string
Executes the string in the underlying OS.
>(system "date")
Sun Aug 26 08:26:37 GMT 2018

nil
quit
Exits the interpreter.
>(quit)
--exits--

Copyright 2008 Ken Shirriff.