> Using GAMBAS 2.19 I tried creating an array: > > PUBLIC Elevation AS Short[65536, 65536] > > With no data assigned to any of the array's elements, reading > Elevation[0,0] shows a value of 24. I'm thinking it should be zero. > Reading > Elevation[4095,0] crashes the program. I tried reading Elevation[100,100] > from the debug window and it also crashes the program. > > Granted this array if fully allocated would consume 8 gigabytes of RAM. My > system has 4 gigs of RAM and an 8 gig swap file. Does GAMBAS use the swap > file if enough physical RAM isn't available? What are the size constraints > of arrays? Why would Elevation[0,0] show up as 24 when Elevation[1,1], > etc., are zero as they should be? > > ----- > Kevin Fishburne, Eight Virtues > www: http://sales.eightvirtues.com http://sales.eightvirtues.com > e-mail: mailto:[email protected] [email protected] > phone: (770) 853-6271 >
This is bug in Gambas2 that did not correctly detect when arrays are too big. I backported a fix for that from Gambas3 in revision #2627, so now you will get the expected error instead of a weird behaviour. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
