[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Holger Schulz <schulz@m...> |
| Subject: | [Caml-list] Declaration |
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