Search Tools Links Login

Evaluate


Takes a string and evaluates it, thus giving the user an answer to a string such as "hsin(1)+hcos(1)", which will be e. The evaluator incorporates an error handler, as well as user entered constants. The function is in the module, easily made to be imported to other programs. A demonstration program is included an shows some possiblities. A help file is not included, but will be available by e-mail. An important point, to keep in mind, that almost all functions must be entered in form of sin(45). If a function has one argument, enter it like sin(45), otherwise, put first argument, function, second argument, as in 2+1.

Original Author: Maseraj

Inputs

The user inputs are minimum. The user only has to enter the string. Optional arguments are to enable/disable the error handler, and include user-created constants.

Assumptions

Those that use TI graphing calculators will remember the way functions are used. To enter square root of nine, put in sqr(9). Sine of 45 is sin(45), and so on, with some exceptions. Standard two-argrument operants like +, are entered just like that, 2+4.

Returns

Returns the value of the string, and any errors. Depending on whether the error handler is enabled or not, a message box may pop up.

Side Effects

Error handler is not fully functional. That means that it doesn't give back very good responses. At this point, though, it will detect any error. No crashes were detected in the testing period of over eight weeks.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 76 times

Categories

Visual Basic 6

Attachments

CODE_UPLOAD6600692000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 10,982 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.