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

[REBOL] Re: Seems I don't understand "load"

From: moliad::gmail::com at: 26-Feb-2008 13:17

hi Steven, Load only decodes strings converting them to rebol natives. it does not evaluate the resulting block of rebol values and symbols. which is why 'DO works, cause it loads AND evaluates the data. the reason your are getting a "file-list has no value" error, is that 'file-list is never bound (given actual meaning within a context), since the set-word isn't evaluated. what you really want to do is this (I think): in your file: (note the comments are not needed, I put them here, just for clarity of the mail.) ;------------------------------ %index.htm %index1.htm %logo150.gif %logo_fromJan.gif %WintixManual.pdf ;---------------------------------- and the script: ;---------------------------------- rebol [ title: "load file example" ] dir: %/c/folder/ file-list: load %file-list.rdata ; the extension isn't important, I just use this to separate scripts from data in my folders foreach path file-list [ ; use join, cause append will modify the dir itself file-path: join dir path ?? file-path ] ask "press enter to quit" ;---------------------------------- Note I use file! types directly and it works hope this helps :-) -MAx On Tue, Feb 26, 2008 at 10:38 AM, Steven White <> wrote: