* Caml : problème avec les string multilignes
@ 1998-05-22 10:05 Alain Frisch
1998-05-25 8:16 ` Xavier Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Alain Frisch @ 1998-05-22 10:05 UTC (permalink / raw)
To: caml-list
Bonjour,
j'ai un problème avec les chaines de caractères multilignes en
CamlLight. J'utilise la version Dos du compilateur et la version
Windows de l'interface.
Le programme suivant me pose problème:
let s="
abc
xyz
"
and f=open_out "x.html" in
output_string f s;
close_out f;;
En mode interactif, j'obtiens le résultat attendu (lignes terminées
par les caractès 0D 0A). Avec le compilateur, le caractère 0D
est dédoublé. Quelqu'un sait-il comment éviter cela (sans passer
sous Unix) ?
Merci.
Alain FRISCH
alfie2@mygale.org
yala.frisch@wanadoo.fr
Alain FRISCH
alfie2@mygale.org
yala.frisch@wanadoo.fr
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Caml : problème avec les string multilignes
1998-05-22 10:05 Caml : problème avec les string multilignes Alain Frisch
@ 1998-05-25 8:16 ` Xavier Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 1998-05-25 8:16 UTC (permalink / raw)
To: Alain Frisch, caml-list
> Le programme suivant me pose problème:
>
> let s="
> abc
> xyz
> "
> and f=open_out "x.html" in
> output_string f s;
> close_out f;;
>
> En mode interactif, j'obtiens le résultat attendu (lignes terminées
> par les caractès 0D 0A). Avec le compilateur, le caractère 0D
> est dédoublé. Quelqu'un sait-il comment éviter cela (sans passer
> sous Unix) ?
Il s'agit en fait d'un bug (mineur) de l'analyseur lexical. Merci de
l'avoir signalé.
Un moyen simple de contourner le problème est de définir s comme suit:
let s="\n\
abc\n\
xyz\n\
"
Ceci dit, passer de Windows à Unix est toujours une excellente idée...
- Xavier Leroy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-05-25 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-22 10:05 Caml : problème avec les string multilignes Alain Frisch
1998-05-25 8:16 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox