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 broken?


hjstein@bfr.co.il (Harvey J. Stein) writes:

> The guile docs say:
> 
>  - primitive: port-line [INPUT-PORT]
>      Return the current column number or line number of INPUT-PORT,

> However, it doesn't seem to work:
> 
>    guile> (define p (open-input-file "extract.scm"))
>    guile> (port-line p)
>    0
>    guile> (read-line p)
[...]
> Is this broken, or is it me?

read-line doesn't update the line counter in the port.

This is a Guile bug.

/mdj