In VFP, n (5,

In VFP, n (5,


The field type is numeric, with a width of 5 digits, 2 digits after the decimal point, 1 digit after the decimal point, and 2 integers left. When calculating the width of table file, there is a default deletion marker, so when calculating the width of 32 table, the display width is 33, which is rarely mentioned in books. It is a relatively cold-blooded question, indicating that the questioner is very serious



For example, str (x = 2)


The str function converts numbers to characters
Format str (numeric expression, length, decimal places)
Where length is the total length (integer part + decimal point + decimal part)
explain:
1. When the decimal place is omitted, the decimal part is not included by default (the decimal part is rounded off)
2. If the length is not specified, the default length is 10 bits
For example: x = 23.456
The value of str (x, 6, 3) is character, that is "23.456"
The value of str (x, 6,1) is "23.5", because to ensure the length is 6 bits, there are two spaces before 2
The value of str (x, 6) is "23" with four spaces before it
The value of str (x) is "23" with 8 spaces in front of it (the default length is 10 bits)
Str (x = 2) is wrong