Advertisement

Expression interpreter??

Started by April 25, 2002 04:52 PM
15 comments, last by edotorpedo 22 years, 9 months ago
quote:
Original post by geward
Dear all,

I am a newbie of GL4java.



George,

Your message has nothing at all to do with this thread. Also, it has nothing to do with math or physics.

Please repost a *new* thread in the graphics programming and theory forum.



Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
quote:
Original post by Anonymous Poster
look on flipcode code of day. it has expression compiler exactly like you want


Excellent! Thank you for this information! I am adding a direct link to the page for that expression evaluator here:

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-ExpressionCompiler&forum=cotd&id=-1

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Advertisement
quote:

You are making the assumption he''s talking about VB6. He''s not. He is talking about VBScript (which can be got from the fact that he says "with Windows Scripting", which is interpreted, and available through the Windows Scripting Host.

VBScript has a method, Exec, to which you pass a string of valid VBScript code and it parses and executes it.



Yes, VB Script has such a method to do that. But the ORIGINAL question asked how to do it in VB or C++, NOT VBScript. If you are going to use Windows Scripting then you would use Windows Scripting within VB or C++ to execute the code. You would NOT use Windows Scripting to execute VBScript code that in turned executed other VBScript code, unless there was a good reason to. Telling C++ or VB to execute VBscript code, just to turn around and have it execute more VBscript code is pointless (unless you are loading code from a database or dynamically creating code from a script).

Therefore I assumed that VB was what he was talking about. Since I rarely see VB4 or VB5 being used anymore, I assumed VB6. I guess that is my fault. Still, I don''t remember VB being able to execute its own interpreted code, but I started in VB4/32.

--TheMuuj
--TheMuuj
I was talking about both. I meant the certain method would be to embed an interpreter such as Python or using Windows Scripting Host. Technically though if you can execute a VB Script from Visual Basic and when you do so you pass the script for it to execute in a variable then Visual Basic provides a means to execute a command in a variable
Keys to success: Ability, ambition and opportunity.
I would suggest migrating this thread over to the General Programming forum...

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
quote:
Original post by LilBudyWizer
I was talking about both. I meant the certain method would be to embed an interpreter such as Python or using Windows Scripting Host. Technically though if you can execute a VB Script from Visual Basic and when you do so you pass the script for it to execute in a variable then Visual Basic provides a means to execute a command in a variable


Hehe. It depends on where the boundaries for one program being and another end. The scripting host is in another library, but then again it IS an in-process library. It is not part of VB, and can be used from any ActiveX-supporting language.

Of course, I consider VB and VBscript to be entirely different languages. Yes, they are similar, but my coding techniques are entirely different for each.

But I hear that there''s a new scripting language that uses C-style syntax (saw it on GameDev''s news not too long ago). That might be useful.

--TheMuuj
--TheMuuj
Advertisement
I''m closing the thread, since it has deviated from the forum subject of math and physics for some time now.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement