Posts: 294
Threads: 9
Joined: Oct 2002
Cool. On the syntax of enum, can you do this?
Code:
enum MYENUM
A, B, C, foo, bar, life = 42
end enum
dim myvar as MYENUM
myvar = life
Posts: 922
Threads: 15
Joined: Jun 2003
Yeah, enums are signed integers (32-bit), you can also declare args as enums, so it may help to make libs easier to use.
Compiler got today optional function arguments too, you can do like sub foo( byval arg1 as integer = 1234, arg2 as double = SOMECONST) and call foo as "foo", "foo , justparam2", "foo ,", "foo justparam1" etc.. that makes emulation of qb procs a bit more simple to do..