Incorrect structure of IN statement causes GDB breakpoint failure in Case statement.
Original Reporter info from Mantis: iru
-
Reporter name: Ian Upton
Original Reporter info from Mantis: iru
- Reporter name: Ian Upton
Description:
Gentlefolk,
I have a simple case statement which processes input 'Key's for fields in a StringGrid.
Works well until vDebug = 8.
The code compiles clean but in debug mode with a breakpoint on the 'If in ['e..... statement the breakpoint is never triggered.
Look at the if statement, I have made a logical error in ['e'..'E'].
Replace ['e'..'E'] with ['e','E'], compiles clean and the breakpoint is triggered when vDebug = 8
.
var
vDebug : integer;
vTestStr : String;
Begin
Case vDebug of
1 : Begin
end;
2 : Begin
end;
...
8 : Begin
If Key in ['e'..'E'] then
vTestStr := vTestStr : char(key);
end;
....
end;
Ian
Steps to reproduce:
Simply compile and execute the above code.
'Key' is a value from tStringGrid.Onkeydowwn(Sender , key........)
Mantis conversion info:
- Mantis ID: 38993
- Build: 2.0.12
- Version: 3.2.0