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

[REBOL] Re: [bug?] Problem with 'load

From: SunandaDH:aol at: 4-Dec-2003 9:03

Hi Brett,
> I might have missed a message on this, but is there any reason why you > cannot use an upgraded version of REBOL?
Thanks for the reply. My mistake.....I got too many version of REBOL around, and I did all my pre-post testing on an older version. Load does now perform as you say, so that eliminates that problem. Just leaves me this problem -- I still want to load any abritrary script to check that it is valid. 'script? alone is not enough to check that it is valid But 'load will return an error if their is a 'needs in the header that doesn't match the interpreter running: troublesome-script: { , REBOL [needs: [9.9.9 xxx]] } script? troublesome-script ;; finds a valid header : correct! load-header troublesome-script ;; Romano's script -- finds a valid header: correct! load troublesome-script ;; fails due to the 'need ** Script Error: This script needs xxx or better to function correctly ** Near: load troublesome-script load/all troublesome-script ;; fails due to the preamble ** Syntax Error: Invalid word -- , ** Near: (line 2) , Looks like I am going to have to do a 'load and then trap and accept the 'needs error. A more elegant solution would be welcome, Thanks, Sunanda.