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

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

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 :|