case sensitivity

Carrick Talmadge clt at pur-phy
Tue Apr 25 13:58:40 AEST 1989


In article <10182 at socslgw.csl.sony.JUNET> diamond at csl.sony.junet (Norman Diamond) writes:
> [...] it is silly to permit two distinct identifiers to differ only in case.

Here is a real life example where I personally would want the case to
be sensitive.  Nobody in physics who reads this would have any problem
with the notation, or would complain about readability problems arising
from reusing the same variable name with upper and lower case.

    /*
     * Calculate gravitational acceleration of an oblate spheroid
     */
    #include <math.h>

    double G = 6.6726e-11;     /* Newtonian constant of gravity (MKS units) */
    double R = 6.3710159e6;    /* mean radius of the Earth (meters) */
    double J2 = 1.0826347e-3;  /* quadrupole moment of the Earth. */
    double g;                  /* acceleration of gravity (MKS units) */
    double r;                  /* distance from CM of spheroid to satellite */
    /* etc. */

Obligatory moralizing omitted...

Carrick Talmadge
ARPA:   clt at physics.purdue.edu
USENET: ...!pur-ee!pur-phy!clt
BITNET: talmadge at purccvm.bitnet



More information about the Comp.lang.c mailing list