In vfp 9 you can skip the is null and just use the additional parameter in vartype.

For numbers you need to check if they are ints etc, strings if they are empty (if they shouldn't be etc), check for illegal characters.

I try(!) to do this for all procedures anyway as it cuts down development problems. Although a lot of the tests are then in asserts.

I suggest creating a set of functions that you can call to do this if you are in earnest which will make it easier to code.

The problem with Dominics approach (using case) is getting a meaningful error message back (e.g. invalid number of parameters etc.)

P.S.  Dominic... is that job title getting longer?

--
Michael Hawksworth
Visual Fox Solutions

[EMAIL PROTECTED]
www.foxpro.co.uk





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to