On Sat, Nov 22, 2003 at 11:43:50AM +0000, rich wrote: > On Sat, Nov 22, 2003 at 01:20:54AM +0100, Kim Nguyen wrote: > > external is_bytecode : unit -> bool = "is_bytecode_bytecode" "is_bytecode_native" > > Neat trick. This _ought_ to work, but it doesn't for some reason: > > let arg = (true, false) > external is_bytecode : bool * bool -> bool = "%field0" "%field1" > > let () = > if is_bytecode arg then > print_endline "Bytecode!" > else > print_endline "Native!" > > Perhaps someone can explain why ... OK, closer inspection of the manual[*] reveals why this doesn't work. Surely OCaml should flag the above code as a bug, because there are fewer than the magical 6 arguments? Rich. [*] http://caml.inria.fr/ocaml/htmlman/manual032.html -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - improving website return on investment 'There is a joke about American engineers and French engineers. The American team brings a prototype to the French team. The French team's response is: "Well, it works fine in practice; but how will it hold up in theory?"'