[snip]
>In order to translate some types of procedures more efficiently, I want to
>pass parameters to some procedures excatly the C does it, meaning that these
>arguments must be typed. For example:
>
> define simple(a,b) -> result;
[snip]
> a * b + 1 -> result;
> enddefine;
>
>would translate to:
>
> int simple(int a, int b)
> {
> return a * b + 1;
> }
Phrases like "integer overflow" come to mind :-)
>What I want is feedback concerning what
>they should look like, since I want my dialect of POP to be fully compatable
>with the traditional one.
>
>My first ideas are along these lines:
> define prototype simple(int a, int b) -> int result;
>and
> ;;; prototype simple(int a, int b) -> int result;
>any suggestions?
I would tend towards using a similar syntax to that used when defining
ObjectClass methods as this will be familier to many people. Something like:
define:prototype simple(a:int, b:int) -> result:int; enddefine;
Adrian
----
Adrian Howard. Head Techie. Victoria Real Ltd.
e. adrianh@oneworld.co.uk - v. +44 (0) 1273 774469 - f. +44 (0) 1273 779960
|