add support for Enums
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11288 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4e9cbd8a7c
commit
ed84d6b162
19 changed files with 865 additions and 222 deletions
16
Examples/scilab/enum/example.c
Normal file
16
Examples/scilab/enum/example.c
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/* File : example.c */
|
||||
|
||||
#include "example.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void enum_test(color c) {
|
||||
if (c == RED) {
|
||||
sciprint("color = RED, ");
|
||||
} else if (c == BLUE) {
|
||||
sciprint("color = BLUE, ");
|
||||
} else if (c == GREEN) {
|
||||
sciprint("color = GREEN, ");
|
||||
} else {
|
||||
sciprint("color = Unknown color!, ");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue