OONumerics User :

From: Jason Bowsher (jason.bowsher_at_[hidden])
Date: 2008-01-29 04:25:28


Thanks Stefan This helps a lot. RegardsJason

  ----- Original Message -----
  From: "Stefan Meinlschmidt"
  To: "Jason Bowsher"
  Subject: Re: [oon-list] Is it possible to dynamically pass equations
  to C++ DLL
  Date: Mon, 28 Jan 2008 10:26:52 +0100

  Hi Jason!

> Can anyone tell me if it is possible to send a dynamic string
  variable to a
> C++ DLL that represents and equation for the DLL to use to
  calculate values
> in columns of an 2D array that is also passed.

  This is a common homework assignment and hobby project:
  http://www.google.de/search?q=homework+calculator+parser

  I once wrote something similar myself for analyzing data from physics
  experiments. You can get the basic idea from the sources:
  http://tabcalc.sourceforge.net/

  Actually, what you want is basically some (specialized) interpreted
  language, so you should have a look at those. Matlab and Octave and
  such come to mind, or more general ones like python
  (http://docs.python.org/tut/tut.html) (surely someone will step in
  here and say "No! Perl is the way to go!", so check that one, too :-)

  If you absolutely need the optimized performance of compiled code,
  you
  need to compile your expression, period. I.e. bring the user's input
  into a form like:

  Column 3[i]=X*(Column1[i]-1)+Y;

  Stick it into some C (or whatever) sourcecode frame, put it through
  the compiler and run the result. system() will be your friend here.

  S.M.

-- 
Want an e-mail address like mine?
Get a free e-mail account today at www.mail.com!