Previous topic | Ada Home Page | Index

Identifiers

Identifiers are names created by the programmer to identify various objects in the program

syntax of identifiers:

Examples:

                student_1
                sum
                height

Unlimited length; Upper/lower case irrelevant

Cannot use reserved words; should not use pre-defined words.

Meaningful identifiers

identifiers should be as meaningful as possible, without being verbose

bad identifiers

        s1
        the_first_student_on_the_course

good identifiers

        student_1
        first_student

i,j,N are ok to represent mathematical notions

avoid similar identifiers (helps avoid typos)

        student_1
        student_2


Previous topic | Ada Home Page | Index
c-lokan@adfa.oz.au / 12 Feb 96