PRB: VARTYPE() Function Returns Data Type Mismatch Error (191277)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q191277

SYMPTOMS

The following error may appear after you use a question mark to display the value returned from the VARTYPE() function:
Data type mismatch.

CAUSE

The question mark does not support the value returned by the VARTYPE() function when evaluating a variable created by the SAVE SCREEN command.

RESOLUTION

Use a temporary variable to store the result of the VARTYPE() function. For example:
   SAVE SCREEN to screenvar
   temp=VARTYPE(screenvar)
   ? temp
				

STATUS

This behavior is by design.

MORE INFORMATION

Type the following commands in the Command window:
   ? "Hello World"
   SAVE SCREEN to screenvar
   ? VARTYPE(screenvar)
				
RESULTS: The error occurs.

Modification Type:MajorLast Reviewed:12/11/1999
Keywords:kbprb KB191277