Why functions need a parameter list to compile?
BlitzMax Forums/BlitzMax Programming/Why functions need a parameter list to compile?
| ||
Is this just the way it is in Max? If I don't put a parameter list it throws a Expecting function type error. No parameter list: Function bmpZeroToNine:Int Return 22 End Function Local num:Int num = bmpZeroToNine Print num Parameter list: Function bmpZeroToNine:Int (x:Int) Return x End Function Local num:Int num = bmpZeroToNine(22) Print num This shouldn't be should it? |
| ||
needs () |
| ||
you can have this, if you like :Function bmpZeroToNine:Int() But the () are required syntax. |
| ||
okee dokee. |