> But maybe the two same errors in both code cancel each other out. Yes, they would. > Could you please give a reproducer? Maybe not. I realized I hadn't pulled for a while, so I did a pull and now "make all" has errors with the Simple Components. The first I saw was fixed long ago, before GNAT 13 was released, IIRC: In deps/simple_components/atomic-access/ada/gnat-sockets-server.adb, procedure Do_Connect, 'Unchecked_Access needs to be changed to 'Unrestricted_Access. If I fix that, then there are other errors that are not so obvious. It's as if it's a much earlier version of the Simple Components. But that is another issue. I'll look into seeing if I can compile 2.1a and use it to make a reproducer. But basically, I obtained a Pixel_Data_Type from a Canvas/Context and then wrote a BMP file of the image. The resulting image was garbled. For a sufficiently small image you could write a P3 PPM file more easily if you want to try it out.
All this is based on the usage of X and Y as indices into a Pixel_Data_Type in procedure Data (Image_Data_Type; Pixel_Data_Type) and function String_To_Pixel_Data, where you find D (X, Y), for example. There's no indication in the spec of Gnoga.Types of the meaning of the two dimensions, but there should be. --Jeff Carter"Now go away or I shall taunt you a second time."Monty Python and the Holy Gral On Thursday, November 16, 2023 at 10:25:39 PM GMT+1, Blady <blady-...@users.sf.net> wrote: Hello Jeff, > Le 14 nov. 2023 à 18:35, Jeffrey R. Carter via Gnoga-list > <gnoga-list@lists.sourceforge.net> a écrit : > > Comments ts based on the 1.7 branch. > > There appears to be an error in function String_To_Pixel_Data, based on the > string returned from function Data (Image_Data_Type) return String: the Y > loop needs to be the outer loop. Well, one chance out of two to be ... wrong. However, I recall having tested the Data procedure and function against Javascript in canva_test.adb. But maybe the two same errors in both code cancel each other out. Could you please give a reproducer? > In addition, the 4 function calls in the aggregate rely on the order of > evaluation, which is not specified by the language. While GNAT is unlikely to > change this, it's safer to assign the results of the calls to variables and > use them in the aggregate. > > Finally, the initialization of S has no effect. Yes it's typical coding style of David. I guess it isn't the only one in Gnoga. You know Ada better than me but I wonder what was David motivation. > Assuming that the string supplied to procedure Data (Image_Data_Type; String) > has the same format, then the change to the loops also applies to procedure > Data (Image_Data_Type; Pixel_Data_Type). Sure. Regards, Pascal. https://blady.pagesperso-orange.fr
_______________________________________________ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list