Function vs. Method ?

BlitzMax Forums/BlitzMax Programming/Function vs. Method ?

Lindsay(Posted 2009) [#1]
Potentially stupid question: When defining an object, what's the difference between using Function and Method?

Thanks,


Jesse(Posted 2009) [#2]
you might want to read this tutorial:
http://www.alsbonsai.com/john/BlitzMax_OOP_Tutorial.pdf


nawi(Posted 2009) [#3]
You call method using a single instance of the type, but you call function using the type itself.


TaskMaster(Posted 2009) [#4]
A function can only affect Global variables in the type, not fields.


ziggy(Posted 2009) [#5]
A function is a shared/static procedure in a class, while a method is a regular calss procedure. More info can be found here


Lindsay(Posted 2009) [#6]
Thanks everyone, I get it now :)


josk(Posted 2009) [#7]
Its all starting to make sense. Thanks.