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

[REBOL] Re: curious use of LENGTH?

From: greggirwin:mindspring at: 31-Jan-2002 12:43

Hi Joel, << If any numeric value counts as TRUE, then if length? s [print s] and print s do exactly the same thing, since the IF would always be satisfied! Hence my question, why the IF ?
I'd say it shouldn't be there, provided they intended to print just a newline (in which case I hope it's commented that way. Bummer that we can't see comments for mezzanine functions.). If they intended it not to print 0 length strings, they need to change the condition to reflect that. Probably worth a submission to feedback, unless they jump in here. It might be that the same thing occurs other places in their code as well. --Gregg