Delphi - Checking length using pos -


i'm using code article:

how convert numbers (currency) words

i can't seem understand how following code works exactly.

try   sintvalue := formatfloat('#,###', trunc(abs(number)));   sdecvalue := copy(formatfloat('.#########', frac(abs(number))), 2);   if (pos('e', sintvalue) > 0) // if number big   begin     result := 'error:';     exit;   end; except  result := 'error:';  exit; end; 

how checking if number big using pos() function? why searching e in integer? make no sense me. apprecaite explanation (the code works fine, want understand why , how).

the code checking use of scientific notation. write number 1000 '1e3'.

the code faintly ridiculous though. hard know why author did not use > comparison operator.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -