Cannot nest anonymous array lazarus / 76-Pas2JS ---------------------------------------------------------------------- SudoKai · 2020-07-21 07:20 Just started playing around with pas2js and got stuck with Multi- Dimensional Arrays. I get 'Error: Cannot nest anonymous array' with the following: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Var Multi_Array: Array of Array of Array of Integer; I can bypass with the following code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Type Multi_Array_Level_02 = record  M_Array_Level_02: Array of Integer; end; Type Multi_Array_Level_01 = record  M_Array_Level_01: Array of Multi_Array_Level_02; end; Var Multi_Array: Array of Multi_Array_Level_01; I also skimmed through the 'Pas2JS-WebGL demo' to see if there was a piece of code using Multi-Dimensional Arrays. But I spotted this comment in 'Mat4.pas' Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i // NOTE: [][] doesn't typecast to array of syntax so we need this So is Multi-Dimensional Arrays not supported in pas2js just yet, or is it my programming skills that needs some adjustment? ---------------------------------------------------------------------- Thaddy · 2020-07-21 07:25 It should work. Try the most recent version and if that does not work file a bug report on Mantis. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program ma;Var Multi_Array: Array of Array of Array of Integer;beginend. ---------------------------------------------------------------------- PascalDragon · 2020-07-21 09:55 Nested anonymous array are currently not supported in Pas2JS as the compiler remarks (Error: Cannot nest anonymous array). You need to declare each sub array: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program tdynarr; type  TLongIntArray = array of LongInt;  TLongIntArrayArray = array of TLongIntArray;  TLongIntArrayArrayArray = array of TLongIntArrayArray;  TLongIntArrayArrayArrayArray = array of TLongIntArrayArrayArray; var  arr: TLongIntArrayArrayArrayArray;// array of array of array of array of LongInt; beginend. ---------------------------------------------------------------------- Thaddy · 2020-07-21 13:12 Yes that works, but it reads like a train station in Wales.... ( which to be fair is actually https://en.wikipedia.org/wiki/Rhoose_Ca rdiff_International_Airport_railway_station )