Eval in A2K and A97

  • Thread starter Thread starter david epsom dot com dot au
  • Start date Start date
D

david epsom dot com dot au

In A97 Eval(Empty) returns Empty. Empty is type compatible with Numeric,
Boolean and String types.

In A2K Eval(Empty) returns Null. Null is only type compatible with Variants.


Function v()
'function that returns empty variant in A97 and A2K
End Function

?VarType(Eval("v()")) & "," & VarType(v())
1,0

'Statement that gives runtime error in A2K but not A97 or A2.0
i = eval("v()")

(david)
 
david epsom dot com dot au said:
In A97 Eval(Empty) returns Empty. Empty is type compatible with Numeric,
Boolean and String types.

In A2K Eval(Empty) returns Null. Null is only type compatible with Variants.


Function v()
'function that returns empty variant in A97 and A2K
End Function

?VarType(Eval("v()")) & "," & VarType(v())
1,0

'Statement that gives runtime error in A2K but not A97 or A2.0
i = eval("v()")

david,

I don't know what exactly your question is, but take a look to the
IsEmpty and IsNull functions. Both accept an expression as a parameter
(see Help items).

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
Back
Top