scilab: enum example same as in other languages
This commit is contained in:
parent
d8a0594254
commit
e37319b9be
6 changed files with 70 additions and 31 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue