Skip to content

Commit

Permalink
Merge pull request #1115 from gusthoff/topic/issues/1101
Browse files Browse the repository at this point in the history
Editorial change: adding instructions about source-code tabs
  • Loading branch information
gusthoff authored Sep 27, 2024
2 parents e500daa + 72469dd commit 292c4b1
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions content/labs/intro-to-ada/chapters/imperative_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Hello World

#. The application must display the message "Hello World!".

**Remarks**:

#. The part that you have to modify is indicated by the
:ada:`-- Implement the application here!` comment in the source code.

.. code:: ada lab=Imperative_Language.Hello_World

-- START LAB IO BLOCK
Expand Down Expand Up @@ -56,6 +61,9 @@ Greetings

#. You can use the concatenation operator (:ada:`&`).

#. The part that you have to modify is indicated by the
:ada:`-- Implement the application here!` comment in the source code.

.. code:: ada lab=Imperative_Language.Greetings

-- START LAB IO BLOCK
Expand Down Expand Up @@ -107,6 +115,35 @@ Positive Or Negative

#. If ``X = 0``, it displays ``Zero``.

.. only:: builder_html

**Remarks**:

#. If you're using the tabbed editor view, you see the following
source-code tabs:

- :file:`classify_number.ads`: this tab has the specification of
the :ada:`Classify_Number` procedure;

- :file:`classify_number.adb`: this tab has the implementation
(body) of the :ada:`Classify_Number` procedure;

- :file:`main.adb`: this tab has the implementation (body) of the
:ada:`Main` test procedure.

#. You're supposed to edit the body of the :ada:`Classify_Number`
procedure.

- In the tabbed editor view, you should select the
:file:`classify_number.adb` tab by clicking on it.

- In the non-tabbed editor view, you should click on the body of
the :ada:`Classify_Number` procedure (which is the second entry).

#. The part that you have to modify is indicated by the
:ada:`-- Implement the application here!` comment in the source
code.

.. code:: ada lab=Imperative_Language.Positive_Or_Negative

-- START LAB IO BLOCK
Expand Down Expand Up @@ -166,6 +203,23 @@ Numbers
#. Given two integer numbers, :ada:`Display_Numbers` displays all numbers
in the range starting with the smallest number.

.. only:: builder_html

**Remarks**:

#. You're supposed to edit the body of the :ada:`Display_Numbers`
procedure.

- In the tabbed editor view, select the :file:`display_numbers.adb`
tab.

- In the non-tabbed editor view, click on the body of the
:ada:`Display_Numbers` procedure.

#. The part that you have to modify is indicated by the
:ada:`-- Implement the application here!` comment in the source
code.

.. code:: ada lab=Imperative_Language.Numbers

-- START LAB IO BLOCK
Expand Down

0 comments on commit 292c4b1

Please sign in to comment.