让我们考虑一下这个头文件:
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
]
]如果此脚本是通过以下命令从文件中执行的:
do %rebodex.r我可以拿到
system/script/header/title但是如果源代码存储在source中,上面的代码会产生错误。那么我如何在标题中获得这个标题呢?有可能吗?
发布于 2010-07-04 00:51:28
如果我没理解错的话,你把脚本放在一个变量中,例如...
>> script: read rebodex.r....and您想要访问标头。
如果这就是您想要的,那么很简单:使用load/header
>> rebodex-header: load/header script
>> print rebodex-header/title
Rebodexhttps://stackoverflow.com/questions/3171523
复制相似问题