Expression eval with MS script ctrl, VB - TechRepublic
General discussion
July 22, 2001 at 04:21 AM
absub1

Expression eval with MS script ctrl, VB

by absub1 . Updated 24 years, 11 months ago

Hai

We want to evaluate expressions that come to the program in the form of strings and contain functions like:

TRIM
LTRIM
RTRIM
STR
MAX
MIN
.
.
.

Especially
IIF
and some user defined functions

Could any body help us with someexamples for ADDCODE() METHOD OF MS-SCRIPT CTRL.
The examples given in MSDN did’nt work.
We don’t mind using the addobject() method either.
For that matter we don’t mind even if you skip the MS-SCRIPT ctrl.

The expressions may look like:

IIF(PURORLEA<>“L”,IIF(SCL>0,”VIE”,””),””)

STR(DAY(DDAY),2)+” “+STR(MONT(DDAY),2)+” “+STR(YEAR(DDAY),4)

IIF(PURORLEA=”L”,IIF(LNIV>0,LR*GSTL1*PSTL1,””),IIF(NIV>0,FINRESID 0,FINRESID,””))

I can give values of the variable or replace identifers with values.

Hope some one finds a solution

Bye.

This discussion is locked

All Comments