FIX: Fatal Exception Error When you Pass an Alpha Character to the VAL() Function (319276)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 7.0
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

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.

MORE INFORMATION

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("Form")
f1.show()
FOR i=1 TO 100
	F1.addobject("T"+allTrim(Str(i)),"container")
	?Val("1.23E4")
NEXT 
RETURN 
 
				

Modification Type:MajorLast Reviewed:3/30/2002
Keywords:kbbug kbCodeSnippet kbDSupport kbVFP700sp1fix KB319276