>
Z=00000000000.00
>
>I do'nt see any integer data type here. MODU STRU shows numeric data type.
CREATE CURSOR tt ( t l ) && integer data type
>Z is 2 digits after comma
>VFP help says that it can do exact computation with 16 digits.
>Also SELECT 00000000000.00 from tt INTO CURSOR t works OK.
Yes, variable value is treated a little bit differently than the exact number. Sometines you can force VFP to calculate the value to get the proper length. But still with lengthy numbers it will not work.
This should work:
z=00000000000.00
SELECT 0+z from tt INTO CURSOR t
But this will not:
z=000000000000.00
SELECT 0+z from tt INTO CURSOR t
>>I am afraid you want to work with integers like with numeric and you are pushing the limit of the VFP integer. The integer can hold up to 10 digits: 2,147,483,647
>>
>>Z=0000000000000
>>CREATE CURSOR tt ( t l )
>>APPEND BLANK
>>SELECT z from tt INTO CURSOR t
>>MODIFY STRUCTURE
>>* it is 10 as expected.
>>
>>
>>
>>>To reproduce
>>>
>>>
Z=00000000000.00
>>>CREATE CURSOR tt ( t l )
>>>APPEND BLANK
>>>SELECT z from tt INTO CURSOR t
>>>MODIFY STRUCTURE
>>>
>>>observed: Width is 13
>>>expected: Width must be 14
>>>applies to Vfp 9, Vfp 7
>>>
>>>note: SELECT 00000000000.00 from tt INTO CURSOR t works as expected
>>>
>>>I have a lot of SELECT Z ...
>>>statements in my application and customer scripts.
>>>
>>>Please advice how to fix this without re-writing all SELECT statements in aplivcation and forcing all customers to re-write all scripts ?