scilab: enum example same as in other languages

This commit is contained in:
Simon Marchetto 2014-07-24 17:09:19 +02:00
commit e37319b9be
6 changed files with 70 additions and 31 deletions

View file

@ -2,5 +2,12 @@
typedef enum { RED, BLUE, GREEN } color;
void enum_test(color c);
class Foo {
public:
Foo() { }
enum speed { IMPULSE, WARP, LUDICROUS };
void enum_test(speed s);
};
void enum_test(color c, Foo::speed s);