Page 1 of 1

allowing Structures to be allowed in procedures returns...

Posted: Thu Jan 13, 2005 6:37 am
by Dreglor
I would like to see Structures to be allowed in procedure returns and arguments, and also allow structures to assined like normal varablies like Me.person=You.Person

that would help me alot in my projects as i always use structures i hate it when i want to return a structure and i have to return a pointer and have the code go to other procedures (or have the normal code) have it rip apart the structure thru pokes to get the data

Posted: Thu Jan 13, 2005 7:40 am
by Inner
can be done already;

Code: Select all

Structure FOO
   parm1.l
EndStructure
structmyfoo.FOO

Procedure.l FillFoo(structmyfoo.l)
  *myfoo.FOO=structmyfoo
    myfoo\parm1=1
    ProcedureReturn *myfoo
EndProcedure

structmyfoo.FOO=FillFoo(structmyfoo)
at least I think that is the way it works.

Posted: Thu Jan 13, 2005 2:09 pm
by dracflamloc
Yea you must use a pointer to return

Posted: Thu Jan 13, 2005 3:46 pm
by Psychophanta
Inner, that's not well done.

Dreglor, i've requested it: viewtopic.php?t=13416

Posted: Thu Jan 13, 2005 4:32 pm
by dracflamloc
Yes it would be a nice feature

Posted: Sat Jan 15, 2005 10:50 pm
by DoubleDutch
It would be very useful.