Previous | Next | Table of Contents | Index | Program List | Copyright

3.9 Tricks of the Trade: Common Programming Errors

When you define enumeration types, keep in mind that the order is important. Thus

    TYPE Days IS (Mon, Tue, Wed, Thu, Fri, Sat, Sun);
is not the same as
    TYPE Days IS (Sun, Mon, Tue, Wed, Thu, Fri, Sat);
because the positions of the various literals are different in the two types.

When you work with packages that are not part of the Ada system, remember that they may have to be compiled before you can use them. If so, you must compile the specification first, then the body. After the specification is compiled, you can compile any program that uses the package, but you cannot link that program until the body is compiled. One you have compiled the package, the compiled form remains available in your file system unless you delete it.


Previous | Next | Table of Contents | Index | Program List | Copyright

Copyright © 1996 by Addison-Wesley Publishing Company, Inc.