From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA26945; Fri, 29 Nov 2002 15:23:49 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA26957 for ; Fri, 29 Nov 2002 15:23:48 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gATENlX27771 for ; Fri, 29 Nov 2002 15:23:48 +0100 (MET) Received: from santenay.inria.fr (santenay.inria.fr [128.93.8.59]) by pauillac.inria.fr (8.7.6/8.7.3) with SMTP id PAA26790 for ; Fri, 29 Nov 2002 15:23:47 +0100 (MET) Date: Fri, 29 Nov 2002 16:23:31 +0100 From: Maxence Guesdon To: caml-list@inria.fr Subject: Re: [Caml-list] string -> int Message-Id: <20021129162331.06e819c0.maxence.guesdon@inria.fr> In-Reply-To: References: Organization: INRIA X-Mailer: Sylpheed version 0.8.5claws (GTK+ 1.2.10; ) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > I would want to have an example in order to convert( using standard > library) a type string in a type int. > > example > > string "150" in int 150 You can use the function int_of_string : string -> int example : int_of_string "150" returns the integer 150. -- Maxence Guesdon ------------------- 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