Using Null in a Function
Monkey Forums/Monkey Programming/Using Null in a Function
| ||
In BMax we could use Null in a function like this:Function AddVec(v:Vec2 = Null) End Function This made is so putting in the "v" Type optional. How do we do it in Monkey? |
| ||
Works the same in Monkey. |
| ||
Yeah, this works here...Class Vec2 Field x:Float End Function AddVec(v:Vec2 = Null) End Function Main () AddVec AddVec (New Vec2) End |