Important alert: (current site time 7/16/2013 1:41:34 AM EDT)
 

winzip icon

An Easy OOP Script engine

Email
Submitted on: 5/28/2002 3:21:18 PM
By: Erik Stites 
Level: Beginner
User Rating: By 8 Users
Compatibility: VB 5.0, VB 6.0
Views: 22440
author picture
(About the author)
 
     Simple scripting language using classes. Uses callbyname function to run a classes methods. This allows for very fast parsing, because there is no IF Then or Case statements. Create a class module with the functions that you want in your scripting 'language'. Then you can simply send a string of text into the class' parse function to get the name of the function and the values to be operated on. After you have gotten the name, use CallByName with the vbMethod operator. This is a quick class (OOP) example. To keep it simple, I didn't include properties, only public and private variables.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 23 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

5/28/2002 8:22:36 PMspeedy5

cool. nice little thing you got going there. i like the use of CallByName. i didn't know that. but i'm not sure it's actually faster because calling a method takes more time than an if or select case because it has to push stuff on the stack and stuff like that. but nice job!
(If this comment was disrespectful, please report it.)

 
5/29/2002 1:55:20 PMErik Stites

Hey, thanks for the feedback, and the vote, heh. Yeah, I didn't measure how long it would take. I also didn't think about the stack thing... Oh well. What I was attempting was to find a way to make a selection without a long Case(Switch if you know C++) statement. Say you have over fifty functions that you would call from a scripting language. Very fast in C, not too bad in VB, but the length of the code might be several pages long. Aside from speed, making smaller code is another aspect of programming.
(If this comment was disrespectful, please report it.)

 
5/30/2002 5:37:06 AMtibisan

tnx man. i was searching for this. it's good for putting my code on text files. it's kind of a plugin system.keep it up!5* from me!
(If this comment was disrespectful, please report it.)

 
6/20/2002 3:38:20 AMWouter Lievens

Holy *darn*! I didn't know that such a thing existed! Thanks man!!!! This is sooooooooo good!!
(If this comment was disrespectful, please report it.)

 
10/8/2002 6:38:00 AMtibisan

hey, do u know a way to call properties too with a function like callbyname? tnx
(If this comment was disrespectful, please report it.)

 
10/18/2004 7:04:37 AMPaul Turcksin

Interesting work. Thanks for sharing. 5 from me.
(If this comment was disrespectful, please report it.)

 
3/6/2007 2:31:01 AMsmile

mm m enjoy it thanks

(If this comment was disrespectful, please report it.)

 
5/18/2007 4:42:08 AMeric quijada

thanks erik very interesting program
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.