On Oct 27, 2003, at 4:24 PM, Lars Jensen wrote:
foo(0)=array{
"rowid" => "1",
"name" => "Mark",
"occupation" => "geek"
}
Equivalent code in RB:
dim foo(0) as dictionary
foo(0) = new dictionary
foo(0).Value("rowid") = "1"
foo(0).Value("name") = "Mark"
foo(0).Value("occupation") = "geek"
True, RB syntax isn't as accommodating as yours, but the translation is
straightforward.
Thanks for the code example, this helps me wrap my head around it.
And note that dictionary keys and values can be any type or class, so
if
it's more convenient to access the row ID as an integer, you could say:
foo(0).Value("rowid") = 1
You could also get closer to the syntax that you posted by wrapping
all this
up in a class or function...
Thanks again. Not too worried about syntax, just functionality :)
Mark
- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|