caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Help with toplevel
@ 2001-02-07 21:51 Bauer, Robert
  2001-02-08 18:40 ` Pierre Weis
  0 siblings, 1 reply; 3+ messages in thread
From: Bauer, Robert @ 2001-02-07 21:51 UTC (permalink / raw)
  To: Caml-List

Hi all,

I new to ocaml but not to ml.  I've installed ocaml 3.00 on my unix systems
and my windows systems.  On each of these platforms, I cannot use top level
functions such as "use", "quit", etc.

I've checked the sources in toplevel and the "functions" are defined, but
for some reason they are not defined in my executables - so, I think that I
am must not be doing something that I should (be doing).

Help???????

Robert



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help with toplevel
  2001-02-07 21:51 Help with toplevel Bauer, Robert
@ 2001-02-08 18:40 ` Pierre Weis
  2001-02-09 14:55   ` CREGUT Pierre FTRD/DTL/LAN
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Weis @ 2001-02-08 18:40 UTC (permalink / raw)
  To: Bauer, Robert; +Cc: caml-list

> Hi all,
> 
> I new to ocaml but not to ml.  I've installed ocaml 3.00 on my unix systems
> and my windows systems.  On each of these platforms, I cannot use top level
> functions such as "use", "quit", etc.
> 
> I've checked the sources in toplevel and the "functions" are defined, but
> for some reason they are not defined in my executables - so, I think that I
> am must not be doing something that I should (be doing).
> 
> Help???????
> 
> Robert

Have a look at the basic Objective Caml examples at adress

http://pauillac.inria.fr/caml/Examples/oc/basics/eng.html

Calling the Caml compiler:
  to compile the file hello.ml to executable program a.out type
    ocamlc hello.ml
  to compile the file hello.ml to executable program hello type
    ocamlc -o hello hello.ml


To try interactively: call the Caml interactive system
        ocaml

Then type in (don't forget the initial # sign, that
indicates a directive)

        #use "loadall.ml";;

Hope this helps,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help with toplevel
  2001-02-08 18:40 ` Pierre Weis
@ 2001-02-09 14:55   ` CREGUT Pierre FTRD/DTL/LAN
  0 siblings, 0 replies; 3+ messages in thread
From: CREGUT Pierre FTRD/DTL/LAN @ 2001-02-09 14:55 UTC (permalink / raw)
  To: caml-list

> 
> Then type in (don't forget the initial # sign, that
> indicates a directive)
> 

Yes but all beginers do the same mistake. May be the toplevel prompt should be
changed to something else (different from #). This would not change our life
but there would be less newcommers asking where is the use, cd, quit and al
function.

On a similar topic, the behaviour of printf that cannot be used in a partial
application should be pointed out more strongly in the manual (red huge bold font)
and more explicitely than the cryptic sentence :

If too few arguments are provided, printing stops just before converting the 
first missing argument. 

Again a student lost a day this week trying to understand why he did not get parts of
his results on the screen. Sure he will not do the mistake again !
 
Another solution would be to eta expand printf functions after it has been typed
This would be externaly cleaner but may be not internaly. But, the code for 
supporting this function in  the compiler is already so bloated anyway.

Pierre Crégut

-- 
Pierre Cregut - pierre.cregut@rd.francetelecom.fr - +33 2 96 05 16 28
FTR&D - DTL/MSV - 2 avenue Pierre Marzin - 22307 Lannion Cedex - France



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-02-09 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-07 21:51 Help with toplevel Bauer, Robert
2001-02-08 18:40 ` Pierre Weis
2001-02-09 14:55   ` CREGUT Pierre FTRD/DTL/LAN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).