Missing operator or semicolon - weird error - delphi
Posted on 2007-08-03
I have a very weird problem - I keep getting a missing operator or semi-colon error with a length function -
Here is the code:
pJPEG.CompressionQuality := 80;
jpglen := Length(sFilename);
tempjpg := LeftStr(sFilename, jpglen - 4);
if FileExists(tempjpg) then
If I comment out the jpglen := Length(sFilename) it works fine //sFilename is defined as string and populated earlier
Usually I know it is missing a semi colon on the line above - but as you can see that is not the case here. I originally had the length function inline in the setting for tempjpg, but then that line failed, which I broke it out to determine where the issue was. If I set the jpglen to an integer value it will compile with no issues...
Any help is appreciated - I do not know why it is giving me this error on a length function...