[Swift-devel] Call function.

Yadu Nand yadudoc1729 at gmail.com
Wed Aug 10 15:44:34 CDT 2011


Hi,

I'm working on implementing a call function which takes procedure
identifiers as strings. This will allow us to do some cool stuff like :

int assoc_array [ string ] [ int ];
assoc_array["do_x"][1] = 1000; assoc_array["do_x"][2] = 1001;
assoc_array["do_y"][1] = 5000;assoc_array["do_y"][2] = 5002;
foreach i in assoc_array {
     foreach vi  in assoc_array[ i ] {
            call ( i , vi  );
}}

I have considered two alternative structures for "call "  :
1.   <result type> <result var> = call ( <func name/ expression> , < args > ) ;
2.   call ( <func name/ expression> ,  <result var>, < args > ) ;

Any ideas on this are welcome.


-- 
Thanks and Regards,
Yadu Nand B



More information about the Swift-devel mailing list