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

27.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 March 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.