Any suggestions on how to tackle this one would be greatly appreciated.
The basic problem is that integers in a small section of a subroutine are displayed and processed as a fixed floating point number, being assigned a value of 9223.37203685478. The variables affected, as evaluated in the Sub seem to change depending on what local code additions I make. I am using PBCC 4.04. There are never any compilation warnings.
Some characteristics are:
1. The integers affected are all Global
2. Changing from Long to Integer has no effect.
3. Placing print statement immediately before the Call shows no problems
4. Placing print statement at the beginning of the Sub shows the problem
5. Placing print statements a dozen lines later after a Select Case shows that the problem has gone away!!!!!
Some of the things I have done to investigate are....
1. Run code analyzer from JF Pro. No anomalies.
2. Run on both Win2000 and Win XP. same result.
3. Run Debug mode and seen the same strange behavior.
4. At the sub routine head dimmed an auxiliary variable and equated the problem variables. No effect
5 Before the Call assigned auxiliary variables and passed the value to the Sub. No effect.
6. Run the code in a 1 sec loop and logged the data to file.
7. Torn all my hair out. No effect.
I hope some one has seen something like that before and can make some recommendations other than a good brand of hair restorer!
Thanks Guys.
Rich
The basic problem is that integers in a small section of a subroutine are displayed and processed as a fixed floating point number, being assigned a value of 9223.37203685478. The variables affected, as evaluated in the Sub seem to change depending on what local code additions I make. I am using PBCC 4.04. There are never any compilation warnings.
Some characteristics are:
1. The integers affected are all Global
2. Changing from Long to Integer has no effect.
3. Placing print statement immediately before the Call shows no problems
4. Placing print statement at the beginning of the Sub shows the problem
5. Placing print statements a dozen lines later after a Select Case shows that the problem has gone away!!!!!
Some of the things I have done to investigate are....
1. Run code analyzer from JF Pro. No anomalies.
2. Run on both Win2000 and Win XP. same result.
3. Run Debug mode and seen the same strange behavior.
4. At the sub routine head dimmed an auxiliary variable and equated the problem variables. No effect
5 Before the Call assigned auxiliary variables and passed the value to the Sub. No effect.
6. Run the code in a 1 sec loop and logged the data to file.
7. Torn all my hair out. No effect.
I hope some one has seen something like that before and can make some recommendations other than a good brand of hair restorer!
Thanks Guys.
Rich
Comment