From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id BC430BC57 for ; Tue, 19 Oct 2010 20:39:19 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArMBAN6CvUzAbSoIe2dsb2JhbACTcI0qUBUBARYiBB7EQYVKBIUN X-IronPort-AV: E=Sophos;i="4.57,351,1283724000"; d="scan'208";a="74065330" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Oct 2010 20:39:19 +0200 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from localhost (okapi.in-berlin.de [192.109.42.117]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id o9JIdI14009711 for ; Tue, 19 Oct 2010 20:39:18 +0200 Received: from e178004122.adsl.alicedsl.de (e178004122.adsl.alicedsl.de [85.178.4.122]) by webmail.in-berlin.de (Horde Framework) with HTTP; Tue, 19 Oct 2010 20:39:18 +0200 Message-ID: <20101019203918.202612lacw5rse6u@webmail.in-berlin.de> Date: Tue, 19 Oct 2010 20:39:18 +0200 From: "Oliver Bandel" To: caml-list@yquem.inria.fr Subject: Code-execution (evaluation) time MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) 4.3.3 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Spam: no; 0.00; bandel:01 in-berlin:01 ocaml:01 argv:01 iter:01 snippets:01 ocaml:01 oliver:01 oliver:01 privat:01 assembler:02 python:03 sys:03 let:03 let:03 Hello, I want to refresh my OCaml knowledge after I (again) paused for a while. I want to know, when certain parts of the code are executed, for example if I have more than one let _ =3D ... statement in my code (for example in different comp0ilaion units each =20 one of them). I also found an old code snippet with the following parts: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D let fnames =3D List.tl(Array.to_list Sys.argv) (* some more code *) let _ =3D List.iter print_days_old fnames =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D So, the value fnames contains the args from the command line and can be used in the first statement of the code. Is there some documentation on the details of which things are executed/evaluated at which point of the execution phase of the program? I don't want to rely on weak knowledge (because some things I've =20 forgotten... jzst have done C, Python and even Assembler (!) during =20 the last years... just some snippets of OCaml in that time.) Ciao, Oliver P.S.: After coming back to OCaml (what I do mostly in privat projects, at work it's very unlikely to have the possibility) I'm again even more convinced that it is the best language for most problems. := ) And it's so much fun using it. :)