From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John Love-Jensen" To: "Pierre NGUYEN-TUONG" , Subject: Re: Constructing Function Calls Date: Wed, 10 Oct 2001 12:14:00 -0000 Message-id: <010301c151be$b76c2ac0$7801a8c0@mneljaypc> References: <3BC492D8.9020601@lip6.fr> X-SW-Source: 2001-10/msg00065.html Hi Pierre, The problem is that C or C++ are not good languges to do what you want to do. Pick a better language, like LISP or Perl. Otherwise, package your parameter data better, such as: typedef enum { kEndOfList, kString, kChar, kInt, kFloat, kDouble } Datum_t; // Whatever you're interested in struct Datum { Datum_t mType; void* mData; }; void function_B(Datum* DataList) { while(DataList->mType != kEndOfList) { switch(DataList->mType) { case kString: printf("--- %s\n", (char*)(DataList->mData)); break; case kChar: printf("--- %c\n", *(char*)(DataList->mData)); break; case kInt: printf("--- %d\n", *(int*)(DataList->mData)); break; case kFloat: printf("--- %f\n", *(float*)(DataList->mData)); break; case kDouble: printf("--- %lf\n", *(double*)(DataList->mData)); break; default: print("--- Danger, Will Robinson!\n"); } ++DataList; } } I'll leave the packaging up of your data as an exercise. Sincerely, --Eljay