P
Peter
Hi
in Clipper and VisualObjects is a Macro Operator available.
This opeartor evaluate Code stored in a String by the runtime-system.
e.g
....
cTest as string
cTest := "2+3"
? cTest // 2+3 type = String
? &cTest // 5 type = Numeric !
It is also possible to evaluate more complex code.
The Macro Operator has access to local (private) variable,
functions....
e.g.
...
function myFunc(i)
return i*10
......
declare a as float
declare b as float
declare n as float
declare c as string
a:=50
b:=3
c := "sin(a) + myFunc(b)"
n := &c // 30,766 ...
Error in the code (string) is handled by the error system: e.g
cTest := "2+3/0"
nResult := &cTest // --> error div. 0
Siply you can use the Operator to evaluate Input from User
whitout parsing the string by yourself.
I have to migrate an old Clipper Proggramm to dotnet. The Programm use
the Macro operator intensively to Calculate user defined reports.
I there a way to do this in cCharp ?
Thanks
Peter
in Clipper and VisualObjects is a Macro Operator available.
This opeartor evaluate Code stored in a String by the runtime-system.
e.g
....
cTest as string
cTest := "2+3"
? cTest // 2+3 type = String
? &cTest // 5 type = Numeric !
It is also possible to evaluate more complex code.
The Macro Operator has access to local (private) variable,
functions....
e.g.
...
function myFunc(i)
return i*10
......
declare a as float
declare b as float
declare n as float
declare c as string
a:=50
b:=3
c := "sin(a) + myFunc(b)"
n := &c // 30,766 ...
Error in the code (string) is handled by the error system: e.g
cTest := "2+3/0"
nResult := &cTest // --> error div. 0
Siply you can use the Operator to evaluate Input from User
whitout parsing the string by yourself.
I have to migrate an old Clipper Proggramm to dotnet. The Programm use
the Macro operator intensively to Calculate user defined reports.
I there a way to do this in cCharp ?
Thanks
Peter