[REBOL] write does not return a value upon success. This is bad for try blocks Re:

2000-09-07 Thread joel . neely
You could "try" (groan ;-) something along the lines of m: not error? try [write ftp:... "hi there"] which leaves m simply indicating success (or failure) of the attempted block. -jn- [EMAIL PROTECTED] wrote: > > I am writing a script that will try 3 times to write a file and then fail, h

[REBOL] write does not return a value upon success. This is bad for try blocks Re:

2000-09-07 Thread lmecir
Hi, try this: tries: 3 until [ set/any 'm try [write ftp://chuck:[EMAIL PROTECTED]/crossing/ndtd/user.r "hi there"] tries: tries - 1 any [tries = 0 unset? get/any 'm] ] Regards Ladislav > I am writing a script that will try 3 times to write a file and th

[REBOL] write does not return a value upon success. This is bad for try blocks Re:(2)

2000-09-07 Thread bo
Try using printerror.r from www.rebol.org in the Script Library section. You can send a disarmed error object to printerror and it will display the error as REBOL would, but without exiting the application. -Bo On 7-Sep-2000/9:57:35-7:00, [EMAIL PROTECTED] wrote: >This method works well... >>>

[REBOL] write does not return a value upon success. This is bad for try blocks Re:

2000-09-07 Thread johnkenyon
Okay - last one, m: error? try [ write ftp://chuck:[EMAIL PROTECTED]/crossing/ndtd/user.r "hi there" ] Does that help? cheers, john I am writing a script that will try 3 times to write a file and then fail, however, I cant place a try block around the REBOL write statement because it does n

[REBOL] write does not return a value upon success. This is bad for try blocks Re:

2000-09-07 Thread ryanc
This method works well... >> m: error? try [ write %test "test" ] == false >> m: error? try [ write test "test" ] == true This will elleviate the problem with nothing being returned from write... >> m: try [ write %test "test" none] == none But you will still have to capture the error... >> m: t

[REBOL] write does not return a value upon success. This is bad for try blocks

2000-09-07 Thread princepawn
I am writing a script that will try 3 times to write a file and then fail, however, I cant place a try block around the REBOL write statement because it does not return anything upon success, thus I get an error that the word is not bound: >> m: try [ write ftp://chuck:[EMAIL PROTECTED]/crossin