This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: port-line and port-column


Per Bothner <bothner@cygnus.com> writes:

> Here is my suggestion:
> 
>  - primitive: port-column [INPUT-PORT]
>  - primitive: port-line [INPUT-PORT]
>      Return the current column number or line number of INPUT-PORT,
>      using the current input port if none is specified.
>      If the number is unknown, the result is #f.  Otherwise,
>      the result is a 0-origin integer - i.e. the first character
>      of the first line is line 0, column 0.  (However, when you
>      display a file position, for example in an error message,
>      we recommand you add 1 to get 1-origin integers.  This is
>      because lines and column numbers traditionally start with
>      1, and that is what non-programmers will find most natural.)

This suggestion has been adopted and will be present in the snapshot
of tomorrow.

/mdj