18 Oct
2006
18 Oct
'06
1:15 p.m.
Hello! Functions for conversion from cl_I into built-in integer types are a little bit weird: if conversion fails, CLN just aborts the program. This weirdness is documented in the manual: \begin{quote} `int cl_I_to_int (const cl_I& x)' `unsigned int cl_I_to_uint (const cl_I& x)' `long cl_I_to_long (const cl_I& x)' `unsigned long cl_I_to_ulong (const cl_I& x)' Returns `x' as element of the C type CTYPE. If `x' is not representable in the range of CTYPE, a runtime error occurs. \end{quote} So my question is: how do I check if the variable of cl_I type can be converted to int (or any other built-in integer type[s])? Best regards, Alexei. -- All science is either physics or stamp collecting.