Function vs. Method ?
BlitzMax Forums/BlitzMax Programming/Function vs. Method ?
| ||
Potentially stupid question: When defining an object, what's the difference between using Function and Method? Thanks, |
| ||
you might want to read this tutorial: http://www.alsbonsai.com/john/BlitzMax_OOP_Tutorial.pdf |
| ||
You call method using a single instance of the type, but you call function using the type itself. |
| ||
A function can only affect Global variables in the type, not fields. |
| ||
A function is a shared/static procedure in a class, while a method is a regular calss procedure. More info can be found here |
| ||
Thanks everyone, I get it now :) |
| ||
Its all starting to make sense. Thanks. |