// 将二进制字符串转换为无符号十进制数
Function BinToInt(Value : String) : LongInt;
var
i : Integer;
begin
Result := 0;
for i := Length(Value) downto 1 do
begin
if Char(Value(i)) = Char('1') then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if Value(i) = Char('1') then
~~~~~~~~~~~~~~~~~~~~~
if Value(i) = '1' then
~~~~~~~~~~~~~~~~~~~~~~
这三行怎么写也编译无法通过
//晕,取数组怎么变成调用数组函数了。
Function BinToInt(Value : String) : LongInt;
var
i : Integer;
begin
Result := 0;
for i := Length(Value) downto 1 do
begin
if Char(Value[i]) = Char('1') then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if Value[i] = Char('1') then
~~~~~~~~~~~~~~~~~~~~~
if Value[i] = '1' then
~~~~~~~~~~~~~~~~~~~~~~
这三行怎么写也编译无法通过