question on methods and more...

BlitzMax Forums/BlitzMax Beginners Area/question on methods and more...

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.

ok lets say i have the following code:


----------------------------------
type myType1
field x:float

method getX()
return x
end method
end type


local myInstance:myType1 = new myType1
local y:float = myInstance.getX()
---------------------------------------


now, i dont get a floating point value... i also get problems when trying to return a string. How can i specify what a method returns ? in java i would write the same method like:

public float getX() {
return x;
}

is there a similar way to declare what type the method returns ??


public