Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #this is a comment
- value; # create a new variable, initializing it to 0
- value = 14; # assign it a new value
- function f(x) {
- return x;
- }
- class Foo { #implicit derives from object
- value; # private by default
- public: # here everything is public
- Foo() { # hail the costructor ( implicitly calls base() to construct object too )
- value = "Hello world";
- }
- Foo():base(Serialize.true) { # passes an argument to object constructor
- value = "Hello world";
- }
- # ~Foo(); #destructor
- property Value { # C# style property
- get {
- return value;
- } set {
- this.value = value;
- }
- }
- protected: # protected now
- public function x(); # only this method is public
- function z(); # but this is protected
- }
- enum Serialize {
- byVal, # = 0
- byRef, # = previous + 1 = 1
- byPtr = 100 # = 100
- None # = previous + 1 = 101
- }
- enumerized = Serialize.byVal;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement