home *** CD-ROM | disk | FTP | other *** search
- function bval(s:string):real;
- { coerces a real value from the s argument 'garbage-999.9999e-99garbage' }
- { Copyright 1989, by J. W. Rider }
- var r:real; code,i,l:integer;
- begin if reversed then bval:=-1.7e38 else bval:=1.7e38;
- i:=posnum(s,l);
- if i<>0 then val(copy(s,i,l),r,code);
- if code=0 then bval:=r;
- end; { function bval }
-