Right. The parameter name is given first, then a colon, then the mode ("in", "out", "in out"), and then the name of the type.

A note for the picky - "Integer" isn't a reserved keyword in Ada, it's just the name of a predefined type. Thus, if there were a type named "A", then the following slightly-different declaration would be okay:

procedure Delete_File( Integer : in A );

This declaration creates a procedure "Delete_File" that takes an input variable named "Integer"; variable "Integer" is of type "A". An Ada compiler can handle that kind of bizarre declaration, but I strongly recommend that you do not use the names of predefined types as variable names. Using predefined type names as variable names is really confusing to humans trying to read the program.

You may go to the next section.

You may also:

PREVIOUS Go back to the question

OUTLINE  Go up to the outline of lesson 4

David A. Wheeler (dwheeler@dwheeler.com)

The master copy of this file is at "http://www.adahome.com/Tutorials/Lovelace/s4s2r1.htm".