13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Here are the rules for composing your own identifiers:o An identifier must begin with a letter.o After the initial letter, it may contain any number of letters, digits, orunderscore characters; it may not contain any other punctuation.o Only the first 8 characters (ignoring underscores) are significant.o Capital and lowercase letters are equivalent.Thus the following six identifiers are equivalent and interchangeable:MY NUMBERMLNUMBERMV_NUMBER_VALUEmynumberMy_Numbermy_number_symbolWhen inventing your own identifiers, it is important to avoid colliding withthe built-in Apple Pascal vocabulary. See Appendix 3F, Table 2, foralphabetized lists of terms that are already meaningful in Apple Pascal. If indoubt, check your new identifier with these lists. The following rules apply:o If a new identifier is the same as an Apple Pascal reserved word, theCompiler will refuse to accept it.o If a new identifier is the same as an Apple Pascal predefined orpredeclared identifier, the Compiler will accept it but the original Pascalidentifier will become unavailable within the scope of the new meaning.NumbersApple Pascal provides seve~al ways for writing numbers in source text:o Whole numbers up to 36 digits long can be written normally. If precededby a minus sign they will be interpreted as negative. If preceded by aplus sign or nothing they will be interpreted as positive. If within therange -32767 to +32768 they can be assigned to Pascal integers;otherwise they must be assigned to long integers. Integers and longintegers are discussed in Chapter 6.o Numbers with decimal parts can be written normally, like wholenumbers with a period included. However, their precision will not bemore than 6 or 7 significant digits.o Numbers with decimal parts may also be written in scientific notation.Here is a typical example:3.14159e+02This format is discussed in more detail in Appendix 3B.Commas, spaces, and other kinds of punctuation may not appear insidenumbers written in Pascal source text.Pascal SyntaxIII-21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!