nik at f0.am
Wed Dec 18 13:24:04 EST 2002
thanks again, this makes it clearer. as for the documentation, this
explanation works fine (maybe sumarised) even something simple in the foreign
funtion/type section along the lines of the fact that the #$ macro can be
used to access constants, and an example (which makes it very obvious) would
back to gl .. .
> > > This makes it possible to use #$ to reference GL-related
> > > constants (via #$) and makes GL-related types and data
> > > structures available. It makes the signature of GL-related
> > > foreign functions available (via #_).
> > im not sure i understand how to access constants this way, could you
> > explain it further?
> The interface database contain parsed versions of (among other things)
> constant definitions from header files. (For a constant, the type
> and value are encoded in a database file.) The translation process
> can do some C expression evaluation, so it (usually) understands things
> #define A 1
> #define B 2
> #define C (A+B)
> and understands enumerations. (The translation process actually
> operates on an intermediate representation, so it doesn't have
> to know too much about C lexical or syntactic conventions.)
> The #$ reader macro basically reads a token (a case-sensitive
> string, more or less) and then tries to find a "constants.cdb"
> file in some "interface directory" that defines a constant
> with a matching name.
> If we use an "interface directory" that contains database files produced
> by parsing the header file fragment above, we can say things like:
> ? (= #$C (+ #$A #$B))
> and (of course) that's true in this case.
> I have the feeling that this stuff could be better documented than it
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
Openmcl-devel mailing list
Openmcl-devel at clozure.com
More information about the Openmcl-devel