| MadSci Network: Computer Science |
Dear Grant
Never programming in Delphi before (but in plenty of other languages) I
had to go hunting for a small function for you. I came across the
following coding at the Delphi website.
To convert from Binary (base 2) to Denary (base 10) in Delphi you can use
the BinToInt function below.
function BinToInt(Value: String): LongInt;
var
i,Size: Integer;
begin
Result:=0;
Size:=Length(Value);
for i:=Size downto 0 do
begin
if Copy(Value,i,1)='1' then
Result:=Result+(1 shl i);
end;
end;
Hope this helps
Andrew S. Wood - MadSci Scientist
Resources:
----------
www.delphi3000.com - Searchword = "BinToInt"
Try the links in the MadSci Library for more information on Computer Science.