No subject


Thu Oct 26 19:20:09 CEST 2017


Value =3D Eval ( Expression AS String [ , Context AS Collection ] ) AS Vari=
ant

As Eval is an calculator where Expresion is a string, the string should
represent a  expression as i.e. "123 + 321 - 4".
Your strPatern does not look like such expresion to me.

More, the last error message "Type mismatch : wanted float got string inste=
ad"
is telling the right thing.
 asfd is here a local variable in the expresion itself, whitout nummeric va=
lue
 Like is not a calculator operator as +-*/ are
 "*" is not a representation of a number or local variable

Context is a collection of value's to use for the variable names in the str=
ing
expression.

  context["asfd"]=3D123
  context["fdsa"]=3D321
  strPatern=3D"asdf + fdsa + 4"
  Value=3DEval(strPatern,context)
This should work as doing "123 + 321 - 4"

Again from help:
  The optional context is a collection that must contain the=20
  value of each undefined symbol of Expression.

So there is no bug here based on you usage of Eval.
The x00 you see are the missing values from the missing context collection.

Ron




More information about the User mailing list