Hi Sebastian,
you cannot give member of UDT a default value.
This is okay:
Type easing
totalDuration as DWORD
end type
This is not okay:
Type easing
totalDuration as DWORD VALUE 0
end type
totalDuration will be, as all numeric types, initialized to 0 by default.
I understand it would be nice to initialize some non-default values, but it is not possible at the moment.
There are some "close" solutions, like:
uses "console"
type easing
totalDuration as dword
function _create()
me.totalDuration = 5 ' some default value
end function
end type
dim e1 as easing ' -- will initialize with constructor, whoa!
printl e1.totalDuration
waitkey
Petr
Bookmarks