variable number of strings passed to function - how?

Ron Widell ron at motmpl.UUCP
Sun Oct 30 15:47:02 AEST 1988


In article <787 at ubu.warwick.UUCP> alfie at warwick.UUCP (Nick Holloway) writes:
[An otherwise good example of argument evaluation ordering]
=Demonstration 2:
=    test (a,b) int a,b; 
=	{ printf ( "&a=%u\n&b=%u\n", (unsigned)&a, (unsigned)&b ); }
=    main () { test ( 1, 2 );}
=
=On the sun3, the output was: (args at increasing addresses)
=    &a=251657624
=    &b=251657628
=On the sun4: (args at decreasing addresses)
		       ^^^^^^^^^^  Huh ?
=    &a=4160748428
=    &b=4160748432
I'm not sure what you mean here. It appears to me that the address of
b is higher than that of a, just like the sun3 (it's certainly a larger
number ;-)).

=JANET : alfie at uk.ac.warwick.cs        | `O O' |16 Queens Rd|   /: :   :-- : :--
=UUCP  : ..!mcvax!ukc!warwick!alfie    |// ^ \\|Hertford    |  / : :   :   : :
=BITNET: alfie%uk.ac.warwick.cs at ukacrl --------|Herts       | /--: :   :-  : :-
=ARPA  : alfie%cs.warwick.ac.uk at cunyvm.cuny.edu|England     |/   : :__ :   : :__


-- 
Ron Widell, Field Applications Eng.	|UUCP: motmpl!ron
Motorola Semiconductor Products, Inc.,	|Voice:(612)941-6800
9600 W. 76th St., Suite G		| If they *knew* what I was saying,
Eden Prairie, Mn. 55344 -3718		| do you think they'd let me say it?



More information about the Comp.lang.c mailing list