Next: , Previous: , Up: iklib conditions   [Index]


6.12.4 Scheme source code position

The following bindings are exported by the library (vicare).

Condition Type: &source-position

Condition type used to represent a position in Scheme source code read from a textual input port; it is derived from &condition. It has the following fields:

port-id

A Scheme string representing the port identifier, for example the file name.

byte

An exact non–negative zero–based integer representing the byte offset of the position in the source.

character

An exact non–negative zero–based integer representing the character offset of the position in the source.

line

An exact non–negative one–based integer representing the line offset of the position in the source.

column

An exact non–negative one–based integer representing the column offset of the position in the source.

Function: make-source-position-condition port-id byte character line column

Build and return a new condition object of type &source-position.

Function: source-position-condition? obj

Return true if obj is a condition object with type &source-position.

Function: source-position-port-id spos
Function: source-position-byte spos
Function: source-position-character spos
Function: source-position-line spos
Function: source-position-column spos

Accessors for the fields of condition objects of type &source-position.