Add initial prototype.

This commit is contained in:
Rod Kay
2022-07-31 17:34:54 +10:00
commit 54a53b2ac0
1421 changed files with 358874 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
with
"math";
project Basic_Math_Demo
is
for Object_Dir use "build";
for Exec_Dir use ".";
for Main use ("launch_basic_math_demo.adb");
package Builder is
for Default_Switches ("ada") use ("-g");
end Builder;
package Compiler is
for Default_Switches ("ada") use ("-gnat2022");
end Compiler;
package Binder is
for Default_Switches ("ada") use ("-E");
end Binder;
package Linker is
for Default_Switches ("ada") use ("-g");
end Linker;
end Basic_Math_Demo;

View File

@@ -0,0 +1,36 @@
with
short_Math,
float_Math.Geometry,
long_Math,
ada.text_IO;
procedure launch_basic_math_Demo
--
-- A simple demonstration of the Math packages.
--
is
package Math renames float_Math;
use Math, math.Geometry;
procedure log (Message : in String) renames ada.text_IO.put_Line;
begin
declare
Value : Real := 0.0;
begin
log (Image (Value, 5));
Value := Value + 1.0;
log (Image (Value, 5));
end;
declare
use Vectors;
Value : Vector_3 := math.Origin_3d;
begin
log (Image (Value));
Value := Value + (1.0, 1.0, 1.0);
log (Image (Value));
end;
end launch_basic_math_Demo;