[Gambas-user] Variables as functions

Brian G brian at westwoodsvcs.com
Wed Oct 20 18:00:10 CEST 2021

It would be useful if variables could also have a type of function. This would really be useful for some applications 

such as 

dim funcList as function[] = [myfunc1, myfunc2, myfunc3] 
dim state as integer = 1 


dim y as integer = funcList[state](parm1, parm2) 

"Failure is the key to success; 
each mistake teaches us something" .. Morihei Ueshiba 
Brian G 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20211020/fe8a5755/attachment.htm>

More information about the User mailing list