2.4 Case sensitivity

If an operating system or programming language differentiates between a word typed partly in upper case, one typed entirely in upper case, and one typed entirely in lower case it is said to be case-sensitive.

You may have used Microsoft Windows: in general it is not case-sensitive. This system runs Solaris which is a variant of the Unix operating system. Unix operating systems are always case-sensitive. For example, look what happens if we capitalise the idle command:

    rayleigh% Idle
    Idle: Command not found
    rayleigh% IDLE
    IDLE: Command not found

Unix commands tend to be written entirely in lower case (though sometimes upper-case characters are used as well). Most modern programming languages (eg. C, C++, Java, Python, Perl, etc.) are case-sensitive too. When writing programs in these languages you have to use lower case much of the time.

In Python there are a few exceptions to this rule. The most important examples you will encounter in this course are Numeric, Oxphys, Gnuplot, Int and Float.

Numeric and Gnuplot are capitalised because they are the names of other programs. Int and Float are capitalised to distinguish them from the terms int and float which have different meanings in Python. The basic rule is that you should type commands in exactly as they appear in this manual.