Ok, what is the REAL difference between method....

BlitzMax Forums/BlitzMax Programming/Ok, what is the REAL difference between method....

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Functions are specific to the type decleration, while methods are specific to a type instance:

Type Car
 Field Name$

 Method Honk()
  Print Name$+" honks horn"
 End Method

 Function Create:Car()
  Local tmp:Car=New Car
  return tmp
 End Function
End Type

MyPorsche:Car=Car.Create()
MyPorsche.Name="Porsche"
MyPorsche.Honk()


[edit]Argh cross post :|