summaryrefslogtreecommitdiff
path: root/test.adb
diff options
context:
space:
mode:
Diffstat (limited to 'test.adb')
-rw-r--r--test.adb19
1 files changed, 14 insertions, 5 deletions
diff --git a/test.adb b/test.adb
index 490bb22..115d24e 100644
--- a/test.adb
+++ b/test.adb
@@ -6,10 +6,19 @@ with Ada.Containers.Vectors;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
procedure Test is
- Map: array (1..10, 1..20) of Integer := [others => [others => 0]];
- Index: array (1..2) of Integer;
+ type State is record
+ X: Integer;
+ Y: Integer;
+ end record;
+
+ procedure Foo(S: in State; V: out Integer) is
+ begin
+ V := S.X*2;
+ end;
+
+ S: State := (X => 69, Y => 420);
begin
- if Index in Map then
- Map() := 1;
- end if;
+ Put_Line(S'Image);
+ Foo(S, S.Y);
+ Put_Line(S'Image);
end;