Previous: Eval and Load, Up: Eval and Load [Contents][Index]
Scheme code defined by load may optionally contain line number information. Currently this information is used only for reporting expansion time errors, but in the future run-time error messages may also include line number information.
This is the primitive for loading, pathname is the name of
a file containing Scheme code, and optional argument reader is
a function of one argument, a port. reader should read and
return Scheme code as list structure. The default value is read
,
which is used if reader is not supplied or is false.
Line number objects are disjoint from integers or other Scheme types. When evaluated or loaded as Scheme code, an s-expression containing a line-number in the car is equivalent to the cdr of the s-expression. A pair consisting of a line-number in the car and a vector in the cdr is equivalent to the vector. The meaning of s-expressions with line-numbers in other positions is undefined.
Behaves like read
, except that
Returns a line-number object with value int. int should be an exact non-negative integer.
Returns the value of line-number object linum as an integer.
Returns true if and only if obj is a line-number object.
Behaves like read
, except that load syntaxes are enabled.
The value of *load-reader*
should be a value acceptable as
the second argument to try-load
(note that #f is acceptable).
This value will be used to read code during calls to scm:load
.
The value of *slib-load-reader*
will similarly be used during
calls to slib:load
and require
.
In order to disable all line-numbering, it is sufficient to set!
*load-reader*
and *slib-load-reader*
to #f.
Previous: Eval and Load, Up: Eval and Load [Contents][Index]