Page 1 of 1
Linked list with Prototype
Posted: Wed Aug 02, 2006 12:21 pm
by Konne
How can I call a List of Prototypes?
If there is any Logic it should work like that:
Code: Select all
Prototype Proc()
NewList Test.Proc()
Procedure Proce()
ProcedureReturn 5
EndProcedure
AddElement(Test())
Test()=@Proce()
Debug Test()() ;Compiler problem!
But it doesn't
Posted: Wed Aug 02, 2006 3:29 pm
by Psychophanta
hehe!
Good one

Posted: Sun Oct 29, 2006 8:19 pm
by Fred
Prototypes can't be used with list or array, because it leads to wierd syntax (a compiler check has been added). If you need that, you can still create a structure and put the prototype in it, it's exactly the same code generated wise.
Posted: Mon Oct 30, 2006 11:50 am
by Psychophanta
Test()()
... mhh... not so wierd
Simply it should mean a prototype used with list or array, IMHO
Posted: Mon Oct 30, 2006 8:21 pm
by Fred
It is wierd

.
Posted: Mon Oct 30, 2006 9:10 pm
by Trond
Posted: Tue Oct 31, 2006 10:11 am
by Psychophanta
Posted: Wed Nov 08, 2006 6:13 pm
by Konne
It's not weird it's common sense. So it should work. I mean if you don't like it don't do it. Everything else would be a waste of resources and writing.
Posted: Fri Oct 05, 2007 6:04 am
by Rescator
It kinda looks weird yeah. I never really liked lists and arrays using () in the first place, looks too much like a procedure or function to me.
*wonders why Fred didn't use [] for lists and arrays instead*
Posted: Fri Oct 05, 2007 9:12 am
by Fred
Rescator wrote:*wonders why Fred didn't use [] for lists and arrays instead*
BASIC

Posted: Fri Oct 05, 2007 12:55 pm
by Kaeru Gaman
Konne wrote:It's not weird it's common sense. So it should work.

that's a good joke
Posted: Fri Oct 05, 2007 1:31 pm
by DoubleDutch
BASIC
Good point. But maybe Rescator has a point too about the [], unless you have other plans for them?