Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at ocaml.org.

Browse thread
string -> charlist
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-08 (22:25)
From: giangiammy <giangiammy@y...>
Subject: Re: let _ = ... WAS Re: "ocaml_beginners"::[] string -> charlist
--- In ocaml_beginners@y..., Nicolas Barbulesco <nbarbulesco@y...> wrote:

> What does
> let _ = myExpression ;;
> do ? I think _ cannot be an identifier.
> 
> Anyway,
> 
> # let _ = 4 ;;
> - : int = 4
> # _ ;;
> Syntax error
> 
> Normal.

Hi, and welcome to the group.

let _ = expression ;; is just a way to say: "evaluate expression
and ignore the result"
As far as I know, "_" alone has no meaning, so the syntax error.

By the way, to make the thing easy to everyone, you should
use a subject related to your question, and don't worry to
start a new topic.
If you reply to a message, quote just the relevant part.

Regards
Gianluca