<a name="enum-type"></a>
### Enum type
- - **'enum'** type is added.
- - You can declare an **enum** type inside a 'struct' or 'interface' and use it as a member variable or parameter.
- ```tidl
+- **'enum'** type is added.
+- You can declare an **enum** type inside a 'struct' or 'interface' and use it as a member variable or parameter.
+ ```tidl
struct Message {
enum Type {
T1 = 0,
T2,
T3
}
-
Type t;
int id;
string str;
string SayHello(Version ver, string str, Message.Type msg);
}
```
-- When using a struct's enum type as a method parameter, it must be specified as **"<struct_name>.<enum_type>"**.
+- When using a struct's enum type as a method parameter, it must be specified as **'<struct_name>.<enum_type>'**.
<a name="import-another-tidl-file"></a>
### Import another TIDL file
import <another.tidl>
interface Message {
- int Send(string name, string msg);
+ int Send(string name, string msg);
}
```