Microsoft KB Archive/319276

= FIX: Fatal Exception Error When you Pass an Alpha Character to the VAL Function =

Article ID: 319276

Article Last Modified on 3/30/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q319276



SYMPTOMS
If you use the Val function and you pass the function an alpha string, you may receive the following error message:

Fatal Error: Exception code: C0000005

After you receive this message, Visual FoxPro closes.



RESOLUTION
To resolve this problem, obtain the latest service pack for Visual FoxPro for Windows 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

316964 How to Obtain the Latest Visual FoxPro for Windows 7.0 Service Pack



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This problem was first corrected in Visual FoxPro for Windows 7.0 Service Pack 1.



Steps to Reproduce Behavior
Paste the following code in a program (.prg) file named Test, and then run the program from the Command window: PUBLIC f1 f1=Create(&quot;Form&quot;) f1.show FOR i=1 TO 100 F1.addobject(&quot;T&quot;+allTrim(Str(i)),&quot;container&quot;) ?Val(&quot;1.23E4&quot;) NEXT RETURN

Keywords: kbbug kbfix kbvfp700sp1fix kbcodesnippet KB319276

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.