I\'m getting a \"colon (:) expected\" syntax error on this code (Line 14; Column 10) and I\'m at a loss. This code runs in Inno Setup compiler, it is Delphi-like, but I don\
The Ansi version of Inno Setup does not seem to support ranges in case
statement.
So you have to enumerate the set:
case C of
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9': B := ...;
...
end;
In what case it's probably better to use if
:
if (C >= '0') and (C <= '9') then
Though even better, use the Unicode version of Inno Setup. It's 21st century, you should not develop non-Unicode applications anymore. See Upgrading from Ansi to Unicode version of Inno Setup (any disadvantages). And Inno Setup 6 has Unicode version only anyway.
You better use the CryptStringToBinary Windows API function for the hex to binary conversion anyway. See my answer to your other question Writing binary file in Inno Setup.
Note that there are lot of other problems with your code.
char
from integer
.Inc
.TStream.WriteBuffer
takes string
, not byte
.