* [Caml-list] Declaration
@ 2004-05-04 15:00 Holger Schulz
2004-05-04 15:27 ` Jean-Christophe Filliatre
0 siblings, 1 reply; 3+ messages in thread
From: Holger Schulz @ 2004-05-04 15:00 UTC (permalink / raw)
To: caml-list
I've a question on declaration, I've a problem porting something from
SML/NJ
In SML/Nj i'd declare
val x= "fgdsgh";
and than
let val x = 2
val y = x+2
in y end;
The first declaration would overwrite the x which will be used in the
declaration of y. I've look in the Ocaml manual but I only found
examples with simultanous declaration like
let x ="dhshdjsa";;
let x =2 and y= x+2 in y;;
which of course delivers a type error, coss x isn't overwritten here.
How the syntax for non-simultanous declaration?
Thanks
hs
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Declaration
2004-05-04 15:00 [Caml-list] Declaration Holger Schulz
@ 2004-05-04 15:27 ` Jean-Christophe Filliatre
0 siblings, 0 replies; 3+ messages in thread
From: Jean-Christophe Filliatre @ 2004-05-04 15:27 UTC (permalink / raw)
To: Holger Schulz; +Cc: caml-list
Holger Schulz writes:
> let x ="dhshdjsa";;
>
> let x =2 and y= x+2 in y;;
>
> which of course delivers a type error, coss x isn't overwritten here.
> How the syntax for non-simultanous declaration?
let x = 2 in
let y = x+2 in
y;;
--
Jean-Christophe
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Declaration
[not found] <Pine.LNX.4.44.0405041709220.30470-100000@lcmpc4.epfl.ch>
@ 2004-05-07 9:27 ` Holger Schulz
0 siblings, 0 replies; 3+ messages in thread
From: Holger Schulz @ 2004-05-07 9:27 UTC (permalink / raw)
To: caml-list
Am 04.05.2004 um 17:10 schrieb Henri DF:
> btw i think this type of questions really belong to the ocaml-beginners
Okay. I´ve subscribed to the beginners list now. So I´d like to
unsubscribe from this list, but all attempts failed. I did receive
error messages only. Could please anyone tell me, how to unsubscribe
from here?
Thanks
hs
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-07 9:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-04 15:00 [Caml-list] Declaration Holger Schulz
2004-05-04 15:27 ` Jean-Christophe Filliatre
[not found] <Pine.LNX.4.44.0405041709220.30470-100000@lcmpc4.epfl.ch>
2004-05-07 9:27 ` Holger Schulz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox