03-19-2005, 01:43 AM
I was wondering will the Any data type ever work by itself (without Ptr usage). I would be pretty cool but not nessicary.
Any Data Type?
|
03-19-2005, 01:43 AM
I was wondering will the Any data type ever work by itself (without Ptr usage). I would be pretty cool but not nessicary.
03-19-2005, 01:54 AM
It does.
Code: DECLARE SUB foo (whatsThis AS ANY)
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio underBASIC, homegrown musicians [img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
03-19-2005, 03:37 AM
It only works for libraries. I guess that's all we'll need it for. It doesn't work as a function return type however.
03-20-2005, 06:29 AM
AS ANY can only be used with prototypes and if the argument is declared as BYREF.
It's there just for QB compatibility, as the QB IDE used to create the prototypes for you automagically, using AS ANY when it couldn't guess the type for some reason.
ew FreeBASIC forums: http://www.freebasic.net/forum/index.php
03-20-2005, 06:53 AM
Yup, it was used in DECLAREs when you hadn't defined your types yet in the code.
In fB I prefer doing it "the proper way", i.e. defining my types before adding the declares. I find it cleaner and less error-prone. Code: TYPE DotType
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio underBASIC, homegrown musicians [img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i |
« Next Oldest | Next Newest »
|