EConvert error on Integer to Integer comparison
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 small program which uses the SdfDataSet object. I attempted to use a QuickSort on the dataset but found the .RecNo was unreliable.
I rewrote the code to add a dynamic array. The idea is to create the array the size of dataset, copy the dataset to the array and then sort the array and then copy the array back to the dataset.
The code compiles clean. When executed the code crashes on a "while tleft <= right do" with an exception "EConvert" "" is and invalid integer the first stages of the QuickSort code. The "tleft" and "right" are integers. They can be viewed in the "local" viewer (CTL-ALT-L) and have correct numeric values.
Checked everything, tried moving the Dynamic array, etc, commented out anything I thought may be an issue.
Any help appreciated.
Thanks, Ian
Steps to reproduce:
A zip of all code and files is attached.
Create a directory C:\Projects\Lazarus\NW2012.
Unzip to there.
Compile and execute.
Click on the "Import" button.
In the Open dialig form select the file NW Round-13 Aths-1-3.csv.
The error should occur at line 422 of FormAVMembers.
Mantis conversion info:
- Mantis ID: 19764
- OS: WinXP
- OS Build: SP-2
- Build: Lazarus 0.9.30 29749
- Platform: 386 Toshiba Portege 500 laptop