Declarations

The purpose of this lab is to discover the basics of the GNAT toolchain on Windows and to put that knowledge to use by declaring some variables.

Questions

  • Follow the instructions in the source file

  • Locate and click on the “Compile & Run” button in GNAT Studio.

_images/gnat_studio_run_button.png

Labs Tips

  • Comment your code by using -- Line comments

  • Ada identifiers are written in Mixed_Case.

  • Use thousand separators when possible 1_000

  • Float and integer literals are not identical

  • Ada types helps expressivity

    • Natural for counting things

    • Named numbers constant for perfect precision

    • Indexing is mostly used through Positive

    • Strict typing is a pillar of the language

  • More resource on recommended Ada style can be found at https://www.adaic.org/resources/add_content/docs/95style/html/sec_3/3-5.html