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

[REBOL] Re: Using 'call

From: greggirwin:mindspring at: 18-Apr-2006 10:35

Hi Tim, TJ> but if I do this:
>>> listing: copy "" ;; output buffer
TJ> res: call/output "ls *.r" listing
>>> res
TJ> == 204 TJ> ;; I'm curious about the reason for the value of res. TJ> It is not the length of 'listing, listing is appended with each TJ> call to 'call. TJ> Just curious. TJ> Does this signal an error? AFAIK, the result of call is always the exit code of the process (and a non-zero result means an error, yes). You can use the /info refinement, and probe the result, to see for sure. I don't know what a 204 result for ls is though, or why it only occurs if you're grabbing the output. Sub'ing DIR for ls here (on Windows), returns 0 either way. Hopefully someone on Linux will jump in here. -- Gregg