[Gambas-devel] Error Handling and Type Testing

Randall Morgan rmorgan62 at ...176...
Mon Feb 6 13:05:31 CET 2012


Hi Benoit,

I'd like to ask you about how best to handle errors. How to report them to
back to Gambas, and how to handle type testing.

I will only be implementing the gsl functions that work with Gambas types
i.e. integer, singles, and doubles. Is it necessary to test for these types
in my code or will gb take care of the testing?
If i do need to test for input types how can I tell gb that a type error
has occurred?

The gsl library allocates memory for structures (gsl_complex, vectors, and
matrices) internally. I'm not sure that gb is can manage this memory.
Therefore is it best to copy the gsl allocated structures to my own and
then free the memory allocated by libgsl? If so should I be using GB.Alloc
for this?

Thanks for the info. I am keeping notes on all of this so I can write the
tutorial once I have a good grasp of this process.

Randall



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20120206/8bf15bd1/attachment.html>


More information about the Devel mailing list