diff options
-rwxr-xr-x | vala.html.markdown | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/vala.html.markdown b/vala.html.markdown index a65c528f..2711f078 100755 --- a/vala.html.markdown +++ b/vala.html.markdown @@ -215,7 +215,7 @@ namespace_int += 5; // Won't compile using NamespaceDemo; namespace_int += 5; // Valid -/* Structs */ +/* Structs and Enums */ struct Closet { public uint shirts; // Default access modifier is private @@ -229,6 +229,13 @@ var struct_init_3 = Closet() { // Type inference also works jackets = 3; } +enum HouseSize { // An example of an enum + SMALL, + MODERATE, + BIG +} + + /* Classes and Object-Oriented Programming */ class Message : GLib.Object { // Class Message extends GLib's Object @@ -271,12 +278,6 @@ public class Calculator : GLib.Object { var calc1 = new Calculator.with_name("Temp"); var calc2 = new Calculator.model("TI-84"); -enum HouseSize { - SMALL, - MODERATE, - BIG -} - ``` * Read about building GUIs with GTK+ and Vala [here](http://archive.is/7C7bw). |