Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Compilation problem in OCAML 3.02 and 3.04
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stagiaire Bioinfo 2001-2002 <stagbio1@l...>
Subject: [Caml-list] Compilation problem in OCAML 3.02 and 3.04
I am a student in Computer Science in the University of Evry (France),
and I tried to compile a simple ocaml program :

let rec fact = function
0 -> 1 | n-> n*(fact(n-1));;


Unfortunately, the "ocamlopt 1fact.ml" command gave me the following
answer :
/tmp/camlasm29.s: Assembler messages:
/tmp/camlasm29.s:2: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:3: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:5: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:6: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:9: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:10: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:14: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:15: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:16: Warning: rest of line ignored; first ignored
character is `a'
/tmp/camlasm29.s:20: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:21: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:28: Error: junk `act_fact_49' after expression
/tmp/camlasm29.s:45: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:46: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:48: Error: junk `act_1' after expression
/tmp/camlasm29.s:49: Error: junk `act' after expression
/tmp/camlasm29.s:53: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:54: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:56: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:57: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:59: Warning: rest of line ignored; first ignored
character is `1'
/tmp/camlasm29.s:60: Warning: rest of line ignored; first ignored
character is `1'
Assembler error, input left in file /tmp/camlasm29.s


I think this is due to the name of the program, 1fact.ml, which should
not begin with a number, because when I renamed the file fact1.ml it
worked perfectly.
Is it normal?


Thank you.
Sarah Djebali.