[comp.sys.apollo] trivia

matt@bacchus.esa.oz (Matthew Atterbury) (05/03/90)

Trivia fans! the following compiles and runs fine on Apollo DN3500 SR10.2 ...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include	<stdio.h>

main(argc, argv)
	int		argc;
	char*	argv [];
{
	int		i;
	i = (argc > 1 ? argc ; 0);
	printf("well, i = %d\n", i);
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Note the ';' instead of the ':' in the ?: expression - it is treated as if
it was a ':' ... why is this so?
-- 
-------------------------------------------------------------------------------
Matt Atterbury [matt@bacchus.esa.oz.au]   Expert Solutions Australia, Melbourne
UUCP: ...!uunet!munnari!matt@bacchus.esa.oz.au            "klaatu barada nikto"
ARPA: matt%bacchus.esa.oz.AU@uunet.UU.NET  "life? don't talk to me about life!"