I have:
type Clear_Colour_Ptr is access procedure (Red, Green, Blue, Alpha : Float32) with
Convention => C;
Clear_Colour : Clear_Colour_Ptr := null;
In a package, Clear_Colour get initialised by a generic function from SDL called Get_Subprogram.
I later use it:
GL.Clear_Colour (Red, Alpha => 1.0, others => 0.0);
^
But get a compiler error:
first.adb:28:41: error: extra "," ignored
first.adb:28:43: error: positional parameter association not allowed after named one
I was certain this was allowed.
Hereās the compiler:
$ alr build -- -v
warn: Generating possibly incomplete configuration because of missing dependencies
ā· Syncing build dir... warn: Generating possibly incomplete environment because of missing dependencies
ā Running pre-build actions for sdlada=2.5.73...
make: Entering directory '/home/laguest/src/mine-new/game-dev/sdl/sdlada/build/gnat'
mkdir -p gen/src/
make: Leaving directory '/home/laguest/src/mine-new/game-dev/sdl/sdlada/build/gnat'
ā Building first=0.1.0-dev/first.gpr...
Changing to object directory of "First": "/home/laguest/src/mine-new/self-learning/cgpiogl/ch2/first/obj/development/"
/home/laguest/.local/share/alire/toolchains/gnat_native_14.1.3_965c1e0e/bin/gcc -c -x ada -gnatA -Og -ffunction-sections -fdata-sections -g -gnatwa -gnatw.X -gnatVa -gnaty3 -gnatya -gnatyA -gnatyB -gnatyb -gnatyc -gnaty-d -gnatye -gnatyf -gnatyh -gnatyi -gnatyI -gnatyk -gnatyl -gnatym -gnatyn -gnatyO -gnatyp -gnatyr -gnatyS -gnatyt -gnatyu -gnatyx -gnatW8 -gnat2022 -gnatyM120 -gnatec=/tmp/GNAT-TEMP-000003.TMP -gnatem=/tmp/GNAT-TEMP-000004.TMP /home/laguest/src/mine-new/self-learning/cgpiogl/ch2/first/src/first.adb
first.adb:28:41: error: extra "," ignored
first.adb:28:43: error: positional parameter association not allowed after named one
compilation of first.adb failed
gprbuild: *** compilation phase failed
error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/home/laguest/src/mine-new/self-learning/cgpiogl/ch2/first/first.gpr", "-v"] exited with code 4
error: Compilation failed.