6 char externs and the ANSI standard

dat dat at hpcnoe.UUCP
Sun Oct 14 07:28:00 AEST 1984


	As far as case distinction, I think that it should be up
to the programmer to define a consistant standard.   For example,
in ANY language, my constants are always all uppercase, and my
'junk' variables (like loop counters) are always in lowercase.

	The compiler recognizing differences in cases can lead
to such evils as;
	
	int	i,I;
	char	word, Word;

and then code lines like

	if (i < 20) I=2;

	word = Word;

very evil.

	Of course the converse argument also holds true; the more that
you limit a language, the less functional it becomes for 'real' tasks.
Look at Pascal for an example of this.  Any version of Pascal that I 
have ever done any significant programs on has always been a superset
of the original J&W Pascal.  In fact here at HP we have a clone called
ModCal which is purported to be a cross between Modula-2 and Pascal!!!

	I would opt for the language ignoring case, though, since it is
easier conceptually for the programmer (the person who counts in the end
ANYWAY) to not worry about the case of a variable than to figure out 
errors like;

	main()
	{
	int i, I = 0;
	
	scanf("%d",&i); /* <-- lower case i */
	printf("i = %d\n", I); /* <-- upper case i */
	}

			somewhat wishy-washy on the subject,

				Dave (dAVE) Taylor (tAYLOR)


<pipe THAT through crypt and decode it!>



More information about the Comp.lang.c mailing list