Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Possible to use optional args in external (C) calls?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-11 (15:11)
From: Eric C. Cooper <ecc@c...>
Subject: Re: [Caml-list] Possible to use optional args in external (C) calls?
On Sat, Oct 11, 2003 at 02:26:28PM +0100, Richard Jones wrote:
> Is it possible to use optional or any labelled args in calls to C
> code? I assume that optional args are passed as 'argtype option',
> but what order do they appear to the C?

The compiler accepts "external" declarations with labelled and
optional parameters, and a little experimentation with "ocaml
-dlambda" shows that the external function is called with the
arguments in the order specified by the "external" declaration.

Eric C. Cooper          e c c @ c m u . e d u

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: