Re: Datatype checking in DotNET
- From: "Daniel Hobson" <djhob1972@xxxxxxxxxxxx>
- Date: Fri, 29 Jun 2007 09:21:48 GMT
Oh what a mess from that last message (/me has to watch my copy and pasting LOL!):-
Hi Nicholas,
Yeah I am doing that now at the moment for example as based on the given
example previously:-
I use StrToFloat, if this fails, it raises an exception (Which is fine of
course).
But what I am trying to achieve here is to ensure the data integrity, does
the data meet the float bounds?????
For integers you could do a test like this:-
tempVal := StrToInt (fieldStr);
if (tempVal < low (IntImSavingToo )) or (tempVal > high
(IntImSavingToo )) then
exit;
IntImSavingToo := tempVal;
Is there something I can use for floats, doubles and singles also???
Daniel.
.
- Follow-Ups:
- Re: Datatype checking in DotNET
- From: Nicholas Sherlock
- Re: Datatype checking in DotNET
- References:
- Datatype checking in DotNET
- From: Daniel Hobson
- Re: Datatype checking in DotNET
- From: Nicholas Sherlock
- Datatype checking in DotNET
- Prev by Date: Re: Datatype checking in DotNET
- Next by Date: Re: TWebbrowser plugin support
- Previous by thread: Re: Datatype checking in DotNET
- Next by thread: Re: Datatype checking in DotNET
- Index(es):
Relevant Pages
|