U++ framework
Do not panic. Ask here before giving up.

Home » Extra libraries, Code snippets, applications etc. » U++ Esc Interpreter, Esc Macros and templates » Esc: maps nested in arrays and vice versa - underdevelopment or a bug?
Re: Esc: maps nested in arrays and vice versa - underdevelopment or a bug? [message #3198 is a reply to message #3196] Fri, 12 May 2006 05:55 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1322
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
fudadmin wrote on Fri, 12 May 2006 00:57

Esc: maps nested in arrays and vice versa - underdevelopment or a bug?


In fact, I should have named this topic: "Don't mess your your maps with unquoted keys!" Laughing
When porting one of my Dialect programs I encountered an unexpected behaviour with lot of "void"'s in my complex arrays-maps structure. Afterwards I realized that Esc requires map keys to be all quoted in such complex array cases. But in Ultimate's++ home page manual:

{ "alfa":10, "beta":20, 20:"40" }


20 is unquoted. When is the creation of new voids expected?

This is a piece of the structure:
menus=[[{
 menu:"MainMenu",
 submenus:[
   [{ menu:"View", name:"ViewLonG" , img:"Ctrl", key:"CtrL_V",
      submenus:[
      [{ menu:"View1" }],
      [{ menu:"View2",
            submenus:[
            [{ menu:"View21", name:"View21Long" }],
            [{ menu:"View22" }]
                     ]
       }]
               ]
   }],
   [{ menu:"File",
      submenus:[
      [{ menu:"New", name:"New File...", img:"Ctrl" }],
      [{ menu:"Open" }],
      [{ menu:"Save" }],
      [{ menu:"SaveAs" }],
      [{ menu:"Quit" }]
             ],
      end:"end"
   }],
....

[Updated on: Fri, 12 May 2006 05:58]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Esc: how to use recursion?
Next Topic: What would be needed for Esc "read_file" or "include" or "import" or..
Goto Forum:
  


Current Time: Tue Jun 23 10:49:47 GMT+2 2026

Total time taken to generate the page: 0.00522 seconds