System interface
(load
filename
)
load library procedure
(load
filename environment-specifier
)
load library procedure
It is an error if filename is not a string.
An implementation-dependent operation is used to transform
filename into the name of an existing file
containing Scheme source code. The
It is unspecified whether the results of the expressions
are printed. The
Rationale: For portability,
(file-exists?
filename
)
file library procedure
It is an error if filename is not a string.
The
(delete-file
filename
)
file library procedure
It is an error if filename is not a string.
The
(exit)
process-context library procedure
(exit
obj
)
process-context library procedure
Runs all outstanding dynamic-wind after procedures, terminates the
running program, and communicates an exit value to the operating system.
If no argument is supplied, or if obj is #t , the exit procedure communicates to the operating system that the program exited normally. If obj is #f , the exit
procedure communicates to the operating system that the program exited abnormally.
The Note: Because of the requirement to run handlers, this procedure is not just the operating system's exit procedure.
(emergency-exit)
process-context library procedure
(emergency-exit
obj
)
process-context library procedure
Terminates the program without running any
outstanding dynamic-wind after procedures
and communicates an exit value to the operating system
in the same manner as exit .
(exit-success)
process-context library procedure
Terminates the program without running any
outstanding dynamic-wind after procedures
and communicates a successful exit value to the operating system
in the same manner as exit .
(exit-fail)
process-context library procedure
Terminates the program without running any
outstanding dynamic-wind after procedures
and communicates a failure exit value to the operating system
in the same manner as exit .
(get-environment-variable
name
)
process-context library procedure
Many operating systems provide each running process with an
environment consisting of environment variables.
(This environment is not to be confused with the Scheme environments that
can be passed to eval : see section 6.12.)
Both the name and value of an environment variable are strings.
The procedure get-environment-variable returns the value
of the environment variable name,
or #f if the named
environment variable is not found. It may
use locale information to encode the name and decode the value
of the environment variable. It is an error if
get-environment-variable can't decode the value.
It is also an error to mutate the resulting string.
(get-environment-variable "PATH")
==> "/usr/local/bin:/usr/bin:/bin"
(get-environment-variables)
process-context library procedure
Returns the names and values of all the environment variables as an
alist, where the car of each entry is the name of an environment
variable and the cdr is its value, both as strings. The order of the list is unspecified.
It is an error to mutate any of these strings or the alist itself.
(current-second)
time library procedure
Returns an inexact number representing the current time on the International Atomic
Time (TAI) scale. The value 0.0 represents midnight
on January 1, 1970 TAI (equivalent to ten seconds before midnight Universal Time)
and the value 1.0 represents one TAI
second later. Neither high accuracy nor high precision are required; in particular,
returning Coordinated Universal Time plus a suitable constant might be
the best an implementation can do.
(current-jiffy)
time library procedure
Returns the number of jiffies as an exact integer that have elapsed since an arbitrary,
implementation-defined epoch. A jiffy is an implementation-defined
fraction of a second which is defined by the return value of the
jiffies-per-second procedure. The starting epoch is guaranteed to be
constant during a run of the program, but may vary between runs.
(jiffies-per-second)
time library procedure
Returns an exact integer representing the number of jiffies per SI
second. This value is an implementation-specified constant.
(define (time-length)
(let ((list (make-list 100000))
(start (current-jiffy)))
(length list)
(/ (- (current-jiffy) start)
(jiffies-per-second))))
(features)
procedure
Returns a list of the feature identifiers which cond-expand
treats as true. It is an error to modify this list.
(system
command
)
process-context library procedure
It is an error if command is not a string.
Executes the given operating system command, displays the results to standard output, and returns the OS return code from the command. |