|
|
|
 |

July 13th, 2004, 08:32 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Will it support all sorts of funky math? Exponents, sin, custom user defined functions, etc.?
|

July 13th, 2004, 05:19 PM
|
 |
General
|
|
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
|
|
Re: SE4 Templatizer Ready for Download!
I'm hoping to basically put in anything that's in the .NET math library, so exponents and sines should be in. As for user-defined functions, I wasn't planning for them, but if you want to add functions, the program is designed to be extensible so you can code them yourself if you know a .NET language such as C#  Basically, I have an Expression class with subclasses for all the different types of expressions there can be (unary operations, constants, functions, etc.) and to add a function you'd have to derive a class from one of my base classes and implement its Value property which does the actual computation.
If I ever get this working I'll post it on www.codeproject.com; my main problem is to get the input string parsed out into an expression tree... but I've read about converting to Reverse Polish Notation and that should prove helpful with everything except the functions... and the (non-user-defined) functions shouldn't be too much after that, it's just a matter of getting them to take multiple parameters...
__________________
The Ed draws near! What dost thou deaux?
|

July 13th, 2004, 06:56 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: SE4 Templatizer Ready for Download!
User defined functions are necessary to prevent having to put the same formula code in 700 entries... 
|

July 13th, 2004, 07:14 PM
|
 |
General
|
|
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Hmm, that might be doable if I just had a separate functions.txt listing all the functions and what they evaluate to; they'd just be evaluated Last in the precedence order, I guess...
__________________
The Ed draws near! What dost thou deaux?
|

July 14th, 2004, 05:37 AM
|
Private
|
|
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SE4 Templatizer Ready for Download!
no offense, but that's kinda like my program, i woulda posted it up, but i couldn't, here's the link to the topic:
http://www.shrapnelgames.com/cgi-bin...=011057#000000
btw, only works for non-weap components (i got bored making it, so i stopped)
|

July 14th, 2004, 05:47 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: SE4 Templatizer Ready for Download!
Quote:
Originally posted by narf poit chez BOOM:
Negate a number? As far as I know, a number is an imaginary creation designed to represent Groups or singles of something. ??
|
I wasn't trying to be funny, I want someone to explain the topic name.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|

July 14th, 2004, 06:13 PM
|
 |
General
|
|
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Negating a number means turning 5 into -5, or -3 into 3, or whatever - basically subtracting it from zero.
__________________
The Ed draws near! What dost thou deaux?
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|