From: Holger Schulz <schulz@mathematik.uni-siegen.de>
To: caml-list@inria.fr
Subject: [Caml-list] Declaration
Date: Tue, 4 May 2004 17:00:41 +0200 [thread overview]
Message-ID: <CF8F6CB8-9DDB-11D8-BAC2-000A95C6FE96@mathematik.uni-siegen.de> (raw)
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
next reply other threads:[~2004-05-04 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-04 15:00 Holger Schulz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CF8F6CB8-9DDB-11D8-BAC2-000A95C6FE96@mathematik.uni-siegen.de \
--to=schulz@mathematik.uni-siegen.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox