From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 5664BBBAF for ; Wed, 6 Aug 2008 16:38:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvIAACdUmUhA6ba5lGdsb2JhbACCKi2OIj4BAQEBCQMKBxEDlXaGBA X-IronPort-AV: E=Sophos;i="4.31,315,1215381600"; d="scan'208";a="13761794" Received: from nf-out-0910.google.com ([64.233.182.185]) by mail2-smtp-roc.national.inria.fr with ESMTP; 06 Aug 2008 16:38:02 +0200 Received: by nf-out-0910.google.com with SMTP id b11so996780nfh.13 for ; Wed, 06 Aug 2008 07:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=k/IMFIP9cNlwXdhmsaNKow4fpStz/lsjpUxMYEeGrGQ=; b=PxMw56AtHQNoQINNrNbH51+HbW8Zx8CczeEQxmQ4DB3Cq5sRu1vaMH/1aDNlKpttEQ 3Demx8rDwtA2XhNG+cBgqwWhW+TpJY2za+ciOsLJtFm0TBQnBSNheTos0h6xA6p5NCXa 0oRoVBHHb1KILYgNoUreYhQ6M9b1N+zu4SXew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=VvRlqd90k+/YkovT6mujNw1tqt7kLYovGspOfZA57LKDTYNKuKrQJV9bX56y4zVi4H 9Kp/q9cVGYiG02+rkBjxk/dUQ/P25m8vzVyXOkbJINZRu/sF2UDqbKzUesC0k8MlX7jd YbvqiijfSVPpnk8CCSkZbx7J/jJ8tsEhOAEjk= Received: by 10.125.81.17 with SMTP id i17mr127125mkl.49.1218033481301; Wed, 06 Aug 2008 07:38:01 -0700 (PDT) Received: by 10.125.93.4 with HTTP; Wed, 6 Aug 2008 07:38:01 -0700 (PDT) Message-ID: Date: Wed, 6 Aug 2008 10:38:01 -0400 From: "Ashish Agarwal" To: "Ben Aurel" Subject: Re: [Caml-list] how to print (or cast) an integer Cc: caml-list@yquem.inria.fr In-Reply-To: <74a4f4670808060708n5102e6e6q57047077fff0fb85@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14732_22574081.1218033481285" References: <74a4f4670808060708n5102e6e6q57047077fff0fb85@mail.gmail.com> X-Spam: no; 0.00; recursive:01 printf:01 printf:01 libref:01 beginner's:01 ocaml:01 bug:01 recursive:01 libref:01 beginner's:01 ocaml:01 bug:01 1975:98 beginners:01 beginners:01 ------=_Part_14732_22574081.1218033481285 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Also note you do not need "and". That is only required when the variables being defined are mutually recursive. It would be better style to write: let x = 1;; let y = 2;; On Wed, Aug 6, 2008 at 10:08 AM, Ben Aurel wrote: > hi > > again a noob question > > -- > 1 let x = 1 and y = 2;; > 2 > 3 x + y ;; > -- > > how can I print the result on line 3? Printf.printf? I can't find a > solution based on the docu > http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printf.html > > thanks > ben > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ------=_Part_14732_22574081.1218033481285 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Also note you do not need "and". That is only required when the variables being defined are mutually recursive. It would be better style to write:

let x = 1;;
let y = 2;;



On Wed, Aug 6, 2008 at 10:08 AM, Ben Aurel <ben.aurel@gmail.com> wrote:
hi

again a noob question

--
1 let x = 1 and y = 2;;
2
3 x + y ;;
--

how can I print the result on line 3? Printf.printf? I can't find a
solution based on the docu
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printf.html

thanks
ben

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

------=_Part_14732_22574081.1218033481285--