1. Returned Message -- Re: Optimized typ
- Posted by Ad Rienks <Ad_Rienks at COMPUSERVE.COM> Jul 21, 1997
- 564 views
Hi to all, Yesterday, I sent the following message to the listserver. I was included= and I also got an acknowledgement. But stil I got the error message that = it was returned, because the recipient was unknown! How can that be? >---------------------- Information from the mail header ----------------------- >Sender: Euphoria Programming for MS-DOS ><EUPHORIA at MIAMIU.ACS.MUOHIO.EDU> >Poster: Ad Rienks <Ad_Rienks at COMPUSERVE.COM> >Subject: Re: Optimized typ >------------------------------------------------------------------------= -- ----- >You wrote: >>Aoh! another question : how can I avoid or recover >the error >message in case of a bad entry ? >Got me !!! I didn't create Euphoria. >>Thank you for any help. >Regards, >Jean Hendrickx - >jean.hendrickx at infoboard.be > =3D >I think it is quite easy. Instead of the 'type check', that aborts with = an >error message in ex.err, you should make it a function, that returns (fo= r >instance) -1 when there is an error in the input. Put this function in a= >while loop: >function check_for_error(object input) >-- code goes here: >-- if error in input then > -- return -1 (BAD) >-- else > -- return 1 (GOOD) >-- end if >end function -- check_for_error >-- main routine ------------------------------- >integer error >error =3D -1 >while error =3D -1 do > -- get input > -- check_for_error(input) > -- if error =3D -1 then > -- error handling routine(s) > -- end if >end while >-- loop will be left with valid input >Hope this helps >Sincerely, >Ad Rienks >writing at 23:37 , on zondag 20 juli 1997 >Using EMail Assist for WinCIM