Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Headers

 [1/5] from: louisaturk::eudoramail::com at: 19-Apr-2002 15:53


Hi Anton, At 01:22 AM 4/20/2002 +1000, you wrote:
>Although I am not really expecting it here on this >list, I don't see a script header. If you are not >using script headers, I recommend them to you and >anyone else reading. All my scripts have them.
That I do for all my scripts, except that I generally remove their contents for my posts to keep from distracting from the code itself. But I guess I should leave at least the purpose field there. Is there any reason to post all the fields? To try to maintain consistency, I have a template file named header with as much of the info as possible already filled in which I insert when I begin each script. Here it is (I suspect that there is more even to these headers than I realize. Are there some advanced purposes for the headers?): REBOL [ Title: "" Date: 1-Jan-2002 Version: 1.0.0 ; majorv.minorv.status ; status: 0 = unfinished; 1 = testing; 2 = stable File: % Author: "Louis A. Turk" Rights: {Copyright (C) Louis A. Turk 2002} Needs: [{Core 2.5}] Email: [louisaturk--eudoramail--com] Language: 'English Purpose: {} Comments: {} History: [ 1.0.0 [1-Jan-2002 {} {lat}] ] ] The version comments I copied from someone on this list. I don't remember who, but they help. Louis

 [2/5] from: jason:cunliffe:verizon at: 26-May-2002 9:14


How do access headers within a REBOL script? REBOL [ Version: 1.2.3 Author: "William Shakespeare" ] show-version: func[][ return Script/Version ; <<<<<< ?? ] ./Jason [doh: "need sunday morning coffee.."]

 [3/5] from: cybarite:sympatico:ca at: 26-May-2002 9:10


For your script, if you probe system/script/header, you should see system/script/header/version

 [4/5] from: jason:cunliffe:verizon at: 26-May-2002 9:39


>> How do access headers within a REBOL script?
ok I found near the beginning of the book.. [isn't it weird how google is so often blind to REBOL?] system/script/header/version Q2: How do access headers within another REBOL script? someotherscript/system/script/header/version ??? ./Jason

 [5/5] from: greggirwin:mindspring at: 26-May-2002 11:44


Hi Jason, << Q2: How do access headers within another REBOL script? >> You need to LOAD it AFAIK. You can use the /header refinement and then the header will be the first value. scr: load/header %test.r hdr: scr/1 You could also use the /all refinement and then make the header object yourself. scr: load/allest.r hdr: make object! scr/rebol Maybe someone else has a better way. --Gregg