[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OOC Core Library
> Would you know about any standards in this area? Maybe you could get us
> started with a set of system flags that we could use in the compiler.
>
> An outline of how system-flags (I dubbed them type/object modifiers)
> could be implemented can be found in frontend/doc/Modifiers in the ooc
> distrib. A section of such flags is identified by [...], the location
> of the section determines what Oberon-2 object (ie, a type, a
> variable, a procedure, etc) is modified by them. It's the back-end's
> task to to parse the stuff inside the brackets. That means that every
> back-end has full freedom in the choice of its supported flags.
But that kind of anarchy would make code which interfaces to external C
libraries non-portable. I thought the whole purpose of using these flags
was to make the code portable. To help this effort along, I suggest that
maybe all the code generators could share a common set of flags that they
all support. For example, a standard C interface might be:
PROCEDURE ["C"] FormatString ["sprintf"]
(s, template : ARRAY OF CHAR [...]): LONGINT;
Here, the [...] indicates that additional arguments are allowed to be passed.
Michael G.
> -- mva
>