English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-11-03 (17:02)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Assert
> List,
>     I still cannot figure out why the assert instruction
> does not return the line number at which the exception occures.

Basically, it's because the compiler uses character numbers
internally; line numbers are computed only when printing an error message.

> The characters are no good to me in debugging. I suppose they make
> sense from the compiler's point of view, but they are no use to me. 

With Emacs, it's as easy to jump to a character number (M-x goto-char)
than to jump to a line number (M-x goto-line).  Since we (the OCaml
developers) are Emacs fans, we didn't think that character numbers
might be a problem for some users.

- Xavier Leroy