manpagez: man pages & more
info bigloo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

26.1.6.7 C enums

This form defines enum types.

<enum-type> → (enum (<ident> <string>)…)

Let us suppose the type:

(type enum
   (enum (id_1 name_1)
         ...
         (id_n name_n)))

Bigloo creates the following functions:

Here is an example of Scheme code using enum type.

(module foo
   (extern
    (type gizmo
          (enum (titi "titi")
                (tutu "tutu")
                (tata "tata"))
          "enum toto")))

(let ((v1 (gizmo-titi))
      (v2 (gizmo-tutu)))
   (print (=gizmo? v1 v2)))

This document was generated on October 23, 2011 using texi2html 5.0.