Skip to content

Commit

Permalink
Problem -> Question, Solution -> Answer
Browse files Browse the repository at this point in the history
  • Loading branch information
leogermond committed Nov 17, 2023
1 parent 6e1c174 commit 89cf677
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ build_solutions:
for lab in "Array_Types" "Record_Types" "Subprograms" "Packages" "Private_Types" "Access_Types" \
"Exceptions" "Interfacing_With_C" "Tasking_Protected_Objects" "Subprogram_Contracts"; do \
echo $$lab; \
Mode=Solution Lab="$$lab" alr build; \
Mode=Answer Lab="$$lab" alr build; \
done
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ On order to work on the labs you must first start GNAT Studio.

On the scenario tab on the left (if it's not there click the View menu > Scenario), chose
the lab you want to work by setting the "Lab" scenario variable. Make sure that "Mode" is set
to "Problem"
to "Question"

On the Project tab, you should then have access to the main file of the lab in question, which
contains the questions.
Expand All @@ -45,7 +45,7 @@ You can compile and run using the dedicated GNAT Studio build / run menus and bu

## Run the solved exercises

If you want to see or run the solutions, on the scenario tab select "Mode" = "Solution". This
If you want to see or run the solutions, on the scenario tab select "Mode" = "Answer". This
will select a new main file, which contains a solution for each lab.
Warning: After having changed the "Mode" variable, you may need to recompile the project by force,
by cleaning it.
Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In order to work on the labs you must first start gnat studio.

On the scenario tab on the left (if it's not there click the View menu > Scenario), choose
the lab you want to work by setting the "Lab" scenario variable. Make sure that "Mode" is set
to "Problem".
to "Question".

On the Project tab, you should then have access to the main file of the lab in question, which
contains the questions.
Expand All @@ -38,7 +38,7 @@ You can compile and run using the dedicated GNAT Studio build / run menus and bu
Run the solved exercises
------------------------

If you want to see or run the solutions, on the scenario tab select "Mode" = "Solution". This
If you want to see or run the solutions, on the scenario tab select "Mode" = "Answer". This
will select a new main file, which contains a solution for each lab.
Warning: After having changed the "Mode" variable, you may need to recompile the project by force,
by cleaning it.
Expand Down
8 changes: 4 additions & 4 deletions labs_solar_system.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ project Labs_Solar_System is
"Subprogram_Contracts");
Lab : Lab_T := external ("Lab", "Getting_Started");

type Mode_Type is ("Problem", "Solution");
Mode : Mode_Type := external ("Mode", "Problem");
type Mode_Type is ("Question", "Answer");
Mode : Mode_Type := external ("Mode", "Question");

Answer_Mode_Dir := "";
case Mode is
when "Problem" =>
when "Question" =>
Answer_Mode_Dir := "src";

when "Solution" =>
when "Answer" =>
Answer_Mode_Dir := "answers";
end case;

Expand Down
8 changes: 4 additions & 4 deletions src/060_record_types/solar_system.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ project Solar_System is
LOADER : LOADER_Type := external ("LOADER", "ROM");


type Mode_Type is ("Problem", "Solution");
Mode : Mode_Type := external ("Mode", "Problem");
type Mode_Type is ("Question", "Answer");
Mode : Mode_Type := external ("Mode", "Question");

for Main use ("main");
for Object_Dir use "obj";
for Languages use ("Ada");

case Mode is
when "Problem" =>
when "Question" =>
for Source_Dirs use ("src");

when "Solution" =>
when "Answer" =>
for Source_Dirs use ("answers");
end case;

Expand Down

0 comments on commit 89cf677

Please sign in to comment.