tags:

views:

42

answers:

1

Let's consider this header:

REBOL [
    Title: "Rebodex"
    Date: 23-May-2010
    Version: 2.1.1
    File: %rebodex.r
    Author: "Carl Sassenrath"
    Modification: "Rebtut"
    Purpose: "A simple but useful address book contact database."
    Email: %carl--rebol--com
    library: [
        level: 'intermediate
        platform: none
        type: 'tool
        domain: [file-handling DB GUI]
        tested-under: none
        support: none
        license: none
        see-also: none
    ]
]

If this script was executed from file with:

do %rebodex.r

I could get

system/script/header/title

But if the source code is stored in source, above would generate an error. So how could I get this title in header ? Is it possible ?

+2  A: 

If I understand the question rightly, you have the script in a variable, eg....

>> script: read rebodex.r

....and you want access to the header.

If that's what you want, then it is simple: use load/header

>> rebodex-header: load/header script
>> print rebodex-header/title
Rebodex
Sunanda