comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Nested data structures
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Nested data structures [message #89916] Wed, 24 December 2014 13:29 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
I am trying to build a data structure that will allow me to specify a person by his State, city, street and street. (This is not my actual need, but it is analogous.) Thus I might specify (as metacode)

['Colorado']['Boulder']['Pearl'][9990] = 'John'

I assume this can be done with nested hashes or dictionaries, but I am having difficulty figuring out how to start. I started writing something like

person = [hash('colorado',['boulder','Denver'], hash('Arizona',[Tuscon','Phoenix'])

but I get lost in making the nesting clear. thanks for any help. --Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLBridge problem with unknown ExecuteTimer method
Next Topic: ERROR: Attempt to subscript B with is out of range

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:04:58 PDT 2025

Total time taken to generate the page: 0.00189 seconds