|
Pages: [1]
|
 |
|
Author
|
Topic: "FINDING" a value in a persistant file of nested blocks.. (Read 283 times)
|
|
jfdutcher
|
I'm trying to mimic the approach to a database file demo'd in chapter 5, Rebol, The Official Guide (authors now seemingly 'out of business').
I am able to make the "FIND" & "SELECT" functions perform as expected even though the values I have preceded my nested blocks with are 'quoted' (I see no way to programmatically apply them 'unquoted' as theirs are (they were applied by an editor).
I'm wanting to be assured that "FIND" & "SELECT" will not find or select equivalent values from 'inside' the nested blocks....limiting their search always instead to the string values that are 'outside' any particular nested block.....this is how I 'think' they are supposed to work. One record from the file is shown below:
"5342" ["HORNBECK" "EDNA" " " "B" "S" "4" "MT" "NAS" "" " " " " "trayvals" [" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "] "allergies" ["" "" ""] "utensils" ["" "" ""] "brkbevs" ["8 OZ ORANGE JUICE" "COFFEE" ""] "dinbevs" ["COFFEE" "" ""] "supbevs" ["COFFEE" "4 OZ ORANGE JUICE" ""] "brksupps" ["" "" ""] "dinsupps" ["" "" ""] "supsupps" ["" "" ""] "brkmenu" ["2 SOFT FRIED EGGS" "1 WHITE TOAST" "" "" "" "" "" ""] "dinmenu" ["CUSTARD WHEN ON MENU" "" "" "" "" "" "" ""] "supmenu" ["" "" "" "" "" "" "" ""] "brkdislks" ["FRENCH TOAST" "TEA" "" "" "" "" "" "" "" "" "" "" "" ""] "dinsupdislks" ["SPAGHETTI/MEATBALLS" "TEA" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""] "thertechs" ["" "" "" "" "" ""] "nourmets" [[" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""] [" " " " " " "" ""]] 22-Jan-2007/20:51:22-5:00 ]
|
|
|
|
|
Logged
|
|
|
|
|
henrikmk
|
I'm wanting to be assured that "FIND" & "SELECT" will not find or select equivalent values from 'inside' the nested blocks....limiting their search always instead to the string values that are 'outside' any particular nested block.....this is how I 'think' they are supposed to work. Both FIND and SELECT do this automatically, since they search on input type and a block at the first level is as much an element as an integer or a string: >> find [a [a] b [b]] 'a == [a [a] b [b]] >> find [a [a] b [b]] 'b == [b [b]]
>> select [a [a] b [b]] 'a == [a] >> select [a [a] b [b]] 'b == [b]
No need to worry. :-)
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |