caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Stupid question about the toplevel
  2004-04-02 21:47 [Caml-list] Stupid question about the toplevel Brian Hurt
@ 2004-04-02 20:50 ` Falk Hueffner
  2004-04-02 22:02   ` Brian Hurt
  2004-04-02 20:50 ` Nicolas Cannasse
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Falk Hueffner @ 2004-04-02 20:50 UTC (permalink / raw)
  To: Brian Hurt; +Cc: Ocaml Mailing List

Brian Hurt <bhurt@spnz.org> writes:

> An example toplevel experience:
> $ ocaml
>         Objective Caml version 3.07
>  
> # 3+4;;
> - : int = 7
> #
>
> So what's the "-" at the begining of the line mean?  Originally I thought 
> it meant that the input came from stdin, but I've been unable to change it 
> to anything else.  Is it just "this line comes from the toplevel and not 
> your code"?

No, it's the identifier the value was bound to:

# let x = 17;;
val x : int = 17

-- 
	Falk

-------------------
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] 6+ messages in thread

* Re: [Caml-list] Stupid question about the toplevel
  2004-04-02 21:47 [Caml-list] Stupid question about the toplevel Brian Hurt
  2004-04-02 20:50 ` Falk Hueffner
@ 2004-04-02 20:50 ` Nicolas Cannasse
  2004-04-02 20:54 ` Pierre Weis
  2004-04-02 21:09 ` Matt Gushee
  3 siblings, 0 replies; 6+ messages in thread
From: Nicolas Cannasse @ 2004-04-02 20:50 UTC (permalink / raw)
  To: Brian Hurt, Ocaml Mailing List

> An example toplevel experience:
> $ ocaml
>         Objective Caml version 3.07
>
> # 3+4;;
> - : int = 7
> #
>
> So what's the "-" at the begining of the line mean?  Originally I thought
> it meant that the input came from stdin, but I've been unable to change it
> to anything else.  Is it just "this line comes from the toplevel and not
> your code"?
>
> It's bugging me now.

what about :

# let x = 3;;
val x : int = 3

that "-"'s meaning is that it's not bound to any identifier.

Regards,
Nicolas Cannasse

-------------------
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] 6+ messages in thread

* Re: [Caml-list] Stupid question about the toplevel
  2004-04-02 21:47 [Caml-list] Stupid question about the toplevel Brian Hurt
  2004-04-02 20:50 ` Falk Hueffner
  2004-04-02 20:50 ` Nicolas Cannasse
@ 2004-04-02 20:54 ` Pierre Weis
  2004-04-02 21:09 ` Matt Gushee
  3 siblings, 0 replies; 6+ messages in thread
From: Pierre Weis @ 2004-04-02 20:54 UTC (permalink / raw)
  To: Brian Hurt; +Cc: caml-list

[...]
> - : int = 7
> #
> 
> So what's the "-" at the begining of the line mean?

It means: ``your input is an expression that computes a value''.

Regards,

Pierre Weis

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


-------------------
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] 6+ messages in thread

* Re: [Caml-list] Stupid question about the toplevel
  2004-04-02 21:47 [Caml-list] Stupid question about the toplevel Brian Hurt
                   ` (2 preceding siblings ...)
  2004-04-02 20:54 ` Pierre Weis
@ 2004-04-02 21:09 ` Matt Gushee
  3 siblings, 0 replies; 6+ messages in thread
From: Matt Gushee @ 2004-04-02 21:09 UTC (permalink / raw)
  To: caml-list

On Fri, Apr 02, 2004 at 03:47:17PM -0600, Brian Hurt wrote:
> 
> An example toplevel experience:
> $ ocaml
>         Objective Caml version 3.07
>  
> # 3+4;;
> - : int = 7
> #
> 
> So what's the "-" at the begining of the line mean?  Originally I thought 
> it meant that the input came from stdin, but I've been unable to change it 
> to anything else.

I'm going to answer your question with a question (don't you hate it
when people do that?):

# let foo = 3+4;;
val foo : int = 7
#

So what does the "val foo" at the beginning of the line mean?

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee@havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)

-------------------
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] 6+ messages in thread

* [Caml-list] Stupid question about the toplevel
@ 2004-04-02 21:47 Brian Hurt
  2004-04-02 20:50 ` Falk Hueffner
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Brian Hurt @ 2004-04-02 21:47 UTC (permalink / raw)
  To: Ocaml Mailing List


An example toplevel experience:
$ ocaml
        Objective Caml version 3.07
 
# 3+4;;
- : int = 7
#

So what's the "-" at the begining of the line mean?  Originally I thought 
it meant that the input came from stdin, but I've been unable to change it 
to anything else.  Is it just "this line comes from the toplevel and not 
your code"?

It's bugging me now.

-- 
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 
Brian

-------------------
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] 6+ messages in thread

* Re: [Caml-list] Stupid question about the toplevel
  2004-04-02 20:50 ` Falk Hueffner
@ 2004-04-02 22:02   ` Brian Hurt
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Hurt @ 2004-04-02 22:02 UTC (permalink / raw)
  To: Falk Hueffner; +Cc: Ocaml Mailing List

On Fri, 2 Apr 2004, Falk Hueffner wrote:

> No, it's the identifier the value was bound to:
> 
> # let x = 17;;
> val x : int = 17
> 
> 

Duh.  Now I feel stupid.

-- 
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 
Brian

-------------------
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] 6+ messages in thread

end of thread, other threads:[~2004-04-02 21:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-02 21:47 [Caml-list] Stupid question about the toplevel Brian Hurt
2004-04-02 20:50 ` Falk Hueffner
2004-04-02 22:02   ` Brian Hurt
2004-04-02 20:50 ` Nicolas Cannasse
2004-04-02 20:54 ` Pierre Weis
2004-04-02 21:09 ` Matt Gushee

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).