Table driven "If then" statements 
Author Message
 Table driven "If then" statements

I would like to have some table driven logic in my application.  Is
this possible?  How in VB do you change an if then statment at
runtime?  In Pascal I think you could change the way an operator
functioned, so that I could change a < to function like a >  This
application is more like an engine, that the users need to be capable
of controlling.  Please let me know if you've ever heard of anything
like this.

example:
         Logic Table
x       <      y    print x
x       =      y    print y

The code would have to support both if then statments.  Getting the
variable values is no problem but I don't know how to set the
statements test and the result.

Thanks
Robert

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 12 May 2002 03:00:00 GMT  
 Table driven "If then" statements
This is easy to implement, just have the user setup the logic in a listview where
thay can add/remove the logic. Then your code would interpret the logic and execute
it line by line.
Quote:

> I would like to have some table driven logic in my application.  Is
> this possible?  How in VB do you change an if then statment at
> runtime?  In pascal I think you could change the way an operator
> functioned, so that I could change a < to function like a >  This
> application is more like an engine, that the users need to be capable
> of controlling.  Please let me know if you've ever heard of anything
> like this.

> example:
>          Logic Table
> x       <      y    print x
> x       =      y    print y

> The code would have to support both if then statments.  Getting the
> variable values is no problem but I don't know how to set the
> statements test and the result.

> Thanks
> Robert

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Mon, 13 May 2002 03:00:00 GMT  
 Table driven "If then" statements
You can't change a compiled statement at runtime in any language, but
there's often a workaround.
VB  can use the Script control, which lets your VB program run scripts,
which are interpreted at runtime.
There's no reason why lines of code in a database counldn't be read by your
VB program and executed as script.



Quote:
> I would like to have some table driven logic in my application.  Is
> this possible?  How in VB do you change an if then statment at
> runtime?  In pascal I think you could change the way an operator
> functioned, so that I could change a < to function like a >  This
> application is more like an engine, that the users need to be capable
> of controlling.  Please let me know if you've ever heard of anything
> like this.

> example:
>          Logic Table
> x       <      y    print x
> x       =      y    print y

> The code would have to support both if then statments.  Getting the
> variable values is no problem but I don't know how to set the
> statements test and the result.

> Thanks
> Robert

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Fri, 17 May 2002 03:00:00 GMT  
 Table driven "If then" statements

Quote:
>You can't change a compiled statement at runtime in any language, but
>there's often a workaround.
>VB  can use the Script control, which lets your VB program run scripts,
>which are interpreted at runtime.
>There's no reason why lines of code in a database counldn't be read by your
>VB program and executed as script.

Or even generated from database content "on the fly" and executed.  :)

-Curtis Spendlove
-Solstice Software



Sat, 18 May 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. OpenRecordset ("Table") or SQL statement

2. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

3. "Driving" apps w/ VB

4. RemoveNetworkDrive to Remove "remembered" Novell Drives

5. "Always on top" driving me crazy

6. "IF" Statement for form

7. Dates in "INSERT INTO" statements

8. wordbasic statement "AppMaximize" generates error 438

9. VBA "good practice" re If statements

10. "Right" statement

11. Breaks/error for statement "UserForm1.Show"

12. "late" DIM statements

 

 
Powered by phpBB® Forum Software