BUG: Calculated Currency Field Ignores Formatting (88603)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft FoxPro for MS-DOS 2.0
  • Microsoft FoxPro for MS-DOS 2.6
  • Microsoft FoxPro for MS-DOS 2.6a
  • Microsoft FoxPro for Windows 2.6
  • Microsoft FoxPro for Windows 2.6a

This article was previously published under Q88603

SYMPTOMS

If a Picture clause on an @...SAY command specifies a format for a currency field, this formatting may be ignored when the output is calculated. For example, if the Picture clause is $999.99 and the calculated output is $123.2342, all decimal places are displayed.

CAUSE

This problem occurs if the @ sign is used in the Picture clause.

RESOLUTION

Remove the @ sign from the Picture clause.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

Run the following code:
   x = 123.1111
   @2,2 SAY x PICTURE "@$999.99"
				
Note that the result is $123.1111 instead of $123.11.

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug kbProgramming KB88603