What I have now is this.......saved as a text file named names.r
I then load file file using

names: load %names.r

then test it as follows...

 names: load %names.r
== [Francois_Prowse [
        workemail [EMAIL PROTECTED]
        homeemail [EMAIL PROTECTED]
        title "engineer"
    ]
    Bill...
>> user: names/francois_prowse
== [
    workemail [EMAIL PROTECTED]
    homeemail [EMAIL PROTECTED]
    title "engineer"
]
>> print user/workemail
[EMAIL PROTECTED]
>>

If would be good if I could do the following but having trouble.

foreach person names [print person/workemail]

Any ideas how I can process the file eaisly to give me all of a specific
entry. Just my stupidity getting in the way.

Cheers

Francois




file begins...
--------------
[
Francois_Prowse

        workemail [EMAIL PROTECTED]
        homeemail [EMAIL PROTECTED]
        title "engineer"
                ]
]

[
Bill_Smith      [
        workemail [EMAIL PROTECTED]
        homeemail [EMAIL PROTECTED]
        title "cleaner"
                ]
]
[
Alyson_King     [
        workemail [EMAIL PROTECTED]
        homeemail none
        title "manager"
                ]
]



> Hi :-)
>
> 1) first, I would change your block to:
>
> Names: [
>  Bill_Smith  [
>         workemail [EMAIL PROTECTED]
>         homeemail [EMAIL PROTECTED]
>         title "Engineer"
>   ]
> ]
>
> If you want to use path navigation, for e.g.
>
> info: names/Bill_Smith
>
> Now you are able to navigate even further:
>
> names/Bill_Smith/workemail
> == [EMAIL PROTECTED]
>
> But sadly, I don't know how to substitute Bill_Smith value with some
> referencing variable ...

Hi Pekr and Francios,

Here's a way to do that....

name: to-word "Bill_Smith"

== Bill_Smith
>> name/:search
== [
    workemail [EMAIL PROTECTED]
    homeemail [EMAIL PROTECTED]
    title "Engineer"
]

works for further levels down too
name: to-word "Bill_Smith"
entry: to-word "title"

>> names/:name/:entry
== "Engineer"


Cheers,

Allen K


Reply via email to