Enumerated types_(re)

Mon, 9 Jun 1997 00:52:20 -0400


I translated a C program to Pascal once that had enumerated types, and in
order to use typedefs like that, you need to re-arrange and improvise. What
I did was put all enums as constants and set them to their appropriate
values. You might be able to use $define's to acheive the desired effect.

----------
> Is it possible to specify the value of an enumerated type? I was trying
to
> port a C header file which did something like this:
> 
>     typedef enum hello_everybody {
>         hello_error = -1,
>         hello_first =  0,
>         hello_second,
>         hello_third
>         ...
> 
> Can this be done with GPC?


Orlando Llanes (ollanes@accesspro.net)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es