Sanjay Kumar (SOHO!dpsanjay@whitestone.raileurope.com) wrote:
: What does the option -z do when used with c4gl ? I went thru the script
: and it says ' allow variable # of args to functions ' .
The -z option lets you call functions with a variable number of arguments.
I don't think you can define 4GL functions which accept a variable number of
arguments, but you can write C functions which do (the way printf works, for
example -- which is not to say you can call printf from 4GL).
So you can write a 4GL program which calls this C function, eg:
MAIN
DEFINE ...
CALL myprintf (string1)
CALL myprintf (string1, val1, val2)
END MAIN
If you try to compile this 4GL program without the -z option, you will get:
Error -4333: The function "myprintf" has already been called with a different
number of parameters.
June
---- June Tong Informix Software ----
---- Senior Consultant (415) 926-6140 ----
---- International Support junet@informix.com ----
---- Location-du-jour: Menlo Park ----