Posted in 1998
I wrote one not too long ago: FUNCTION DUMMY WHENEVER ANY ERROR CONTINUE END FUNCTION FUNCTION not_an_int(incoming) DEFINE incoming INTEGER RETURN status END FUNCTION FUNCTION DUMMY2 WHENEVER ERROR .... END FUNCTION Then merely... IF not_an_int(char_var) THEN ........ Note - I wouldn't swear to the WHENEVER syntax - I may have that slightly off. Of course I don't have the function handy... The trick is in to getting the compiler to not check status for your conversion. Passing the char variable to a function which expects an int implies a conversion and status gets set if it fails. cheers j.
We use strictly necessary cookies to make this site work. With your consent we’d also use optional cookies for analytics and marketing. You can accept all, reject all, or choose. Read our Cookie Policy.