[racket] file-position and source-location-position

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Wed Jun 6 23:43:25 EDT 2012

Question: A number for source location position of a syntax object is 
what file-position would say after the first character of the syntax had 
been read?

I'm double-checking before I code this into an API.  I see in 
"http://doc.racket-lang.org/reference/linecol.html" the statement 
"Position and line locations are numbered from 1; column locations are 
numbered from 0."  I would've expected position to be from 0 (like 
"file-position"), and line and column to both possibly be from 1 (like 
most programming tools use), but at least for line and column to use the 
same base.

Neil V.


Posted on the users mailing list.