TIP: Click on subject to list as thread! ANSI
echo: delphi
to: RONALD SIEMONS
from: MARTIN MAAT
date: 1997-03-16 20:34:00
subject: Problem with editmask

Hallo Ronald
 RS> Ik kan het volgende probleem niet opgelost krijgen.
English please!  :-)
[11123.45 as real becomes 11123.45 as string (OK).
 123__.45 as real becomes 123 as string (not OK)  ]
RS> Edit.Mask is !#####.99;1;_
I wonder if DBEdit supports real data. If so, it would make more sense to use 
that instead. Anyway...
 RS> en de functies zijn:
 RS> Function MakeItAReal(I :String): Real;
 RS> Var 
 RS>   R    :real   ;
 RS>   Code :integer;
 RS> Begin
 RS>   Val(I,R,Code);
 RS>   MakeItAReal := R;
 RS> End;
as long as you'll be using this, protect it agains non-numeric data with a 
try except block.
Groeten, Martin.
--- FMail/386 1.02
---------------
* Origin: -=[ E-mail: m_maat@knoware.nl .......... ]=- (2:286/420.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.