Mail Archives: djgpp-workers/2001/02/02/15:24:41
On Fri, Feb 02, 2001 at 02:13:02PM -0600, JT Williams wrote:
> Here's a partial patch for djasm.txi (the part that adds discussion
> of enumeration type). Could a few extra eyes read this over before
> I commit it? I'm not sure about some of the markup. Thanks.
> (And thanks, Bill, for making it so easy ;-)
Heh, I'm glad I did. I wasn't sure if I was making things hard or easy.
> +In this example, the enumeration constants @samp{foo}, @samp{bar},
> +and @samp{e} are implicitly initialized.
> +The enumeration @samp{snafu} therefore takes one of the following integer
> +values: foo (-1), bar (0), a (1), b (2), c (4), d (8), or e (9).
> +
> +@example
> +.enum snafu
> + foo
> + bar
> + a=1
> + b=2
> + c=4
> + d=8
> + e
> +.ends
This doesn't seem quite right. I think that should be foo (0), bar (1), a(1)
... like in C...
I just checked, it is just like in C.
0000:0000 __zero__ (?)
0000:0000 snafu.foo (?) <-- ***
0000:0001 snafu.a (?) <-- ***
0000:0001 snafu.bar (?) <-- ***
0000:0002 snafu.b (?)
0000:0004 snafu.c (?)
0000:0008 snafu.d (?)
0000:0009 snafu.e (?)
Otherwise, everything looked good to me.
Bill
--
Leave others their otherness. -- Aratak
- Raw text -