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

saving Rebol

 [1/4] from: gchiu:compkarori at: 24-Nov-2000 7:08


In Forth, when you add new words to the dictionary, you can save the new forth image so that when executed again, all the new words are retained. Is there something like this in Rebol? And what's the Rebol way of doing conditional compilation? I would have guessed something like if ( not exists? clean-script ) [ do %clean-script.r ] but exists? only works on files and urls. -- Graham Chiu

 [2/4] from: carl:cybercraft at: 24-Nov-2000 19:19


On 24-Nov-00, Graham Chiu wrote:
> In Forth, when you add new words to the dictionary, you can > save the new forth image so that when executed again, all > the new words are retained. > Is there something like this in Rebol?
Can't help you with that one, but...
> And what's the Rebol way of doing conditional compilation? > I would have guessed something like > if ( not exists? clean-script ) > [ do %clean-script.r ] > but exists? only works on files and urls.
You can see if words exist using value? So, assuming clean-script.r creates a word called 'clean-script-flag, the following should work for you... if ( not value? 'clean-script-flag ) [ do %clean-script.r ] Hope that's of some use. Carl Read.

 [3/4] from: gchiu:compkarori at: 24-Nov-2000 20:36


On Fri, 24 Nov 2000 19:19:30 +1200 Carl Read <[carl--cybercraft--co--nz]> wrote:
> You can see if words exist using value? So, assuming > clean-script.r
<<quoted lines omitted: 4>>
> [ do %clean-script.r ] > Hope that's of some use.
Thanks Carl, that works. Exists? would also be nice :-) -- Graham Chiu

 [4/4] from: g:santilli:tiscalinet:it at: 24-Nov-2000 14:46


Graham Chiu wrote:
> In Forth, when you add new words to the dictionary, you can > save the new forth image so that when executed again, all > the new words are retained. > > Is there something like this in Rebol?
You can SAVE your values and then LOAD/DO them back inside your user.r.
> if ( not exists? clean-script ) > [ do %clean-script.r ] > > but exists? only works on files and urls.
Try using VALUE? 'WORD. HTH, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted