maxclass@... wrote: > Somewhere in the past it seems to me that I can remember running > into functions that were able to take a variable number of > arguments. Sometimes 2, sometimes 3, sometimes 4, etc. Something > akin to fn foo( 4,,3.14159,,,,2,) > With a miss match of parameters passed opposed to what the function > is expecting it seems this would definitely cause a compiler error. > Does anyone know if this is possible and how one would go about > creating such a function? > Could it be possible to also make the individual parameters of > varying types as well? > Re the above question does the possibility exist of having function > parameters that act not unlike "Unions" where, for example, the each > parameter could be a boolean, short, long, single, pointer, handle, > etc. or any other defined type? > If so how would one construct such a function? <http://en.wikipedia.org/wiki/Stdarg.h> <http://www.codeproject.com/KB/cpp/argfunctions.aspx> Here's my first draft of an FB implementation: local fn Duh( argc as long, argv as ptr to ArrayOfHorribleUnionsWithTypesAndActualValuesOrPerhapsPointersToTheValuesOrMaybe ... ) end fn Robert P.