your confusing methods and functions. Functions are generic, not instance-dependant. From a function you can only access constants and globals defined on the type. From a method, you can access also fields, becouse they are instance-based.
You can even call a function from the type name, without creating any instance.
This will compile on any IDE
This will not compile on any IDE:
This will compile again on any IDE:
That's the diference between Methods and function on Blitzmax, and it has nothing to do with the IDE your editing your code in.
You can even call a function from the type name, without creating any instance.
This will compile on any IDE
Type MyClass Global Name:String Function StartThis() Graphics(800,600) Print (Self.Name) end Function End Type MyClass.StartThis()
This will not compile on any IDE:
Type MyClass Field Name:String Function StartThis() Graphics(800,600) Print (Self.Name) 'Name is a field, so needs an instance, as every instance have its own NAME field. end Function End Type MyClass.StartThis()
This will compile again on any IDE:
Type MyClass Field Name:String Method StartThis() Graphics(800,600) Print (Self.Name) End Method End Type Local MyClassInstance:MyClass = New MyClass MyClassInstance.StartThis()
That's the diference between Methods and function on Blitzmax, and it has nothing to do with the IDE your editing your code in.