Re: [pcgen] Re: [DOCS] JEP formulas
- [Frugal wrote:]
>> It would be fairly trivial to add if-then-else constructs to JEP. ...[Eric Beaudoin replied:]
>> if( CL>=4, CL-1, CL)
> If we need a if-then-else operator, I think we shoul use the veryBe very careful: you are proposing a custom syntax which must be
> commun <logical-expression>?<expression-if-true>:<expression-if-false>
> Your example would be:
> Other examples:
> max(x,y) = x>y?x:y
> # result is assiged the value of parameter if parameter is
> # not equal to -1, otherwise, result is assign the 0 value.
> result = parameter <> -1 ? parameter : 0
> Éric "Space Monkey" Beaudoin (hiding in the trench)
somehow handled in a pre-parser, unless I've misunderstood how JEP
works. As I've mentioned, that path is a slippery slope.
True, the syntax you propose is somewhat common (among specific
programming languages). But it will have to be parsed, rather than
handled as a JEP function call. Or else JEP must somehow be customized
to handle this alien (to it) syntax.
This sets the stage for adding more "gee this would be neat" features
to a pre-parser. The next thing you know, your pre-parser is bigger
than the function it feeds, and you've lost all the benefits of
switching to a standards-based expression handler in the first place.
It also creates an ongoing code-maintenance hassle every time JEP is
Also (before Tir beats me to the punch): the stuff we want to put in
LST files is mostly descriptions of objects (equipment, characters,
classes, spells, etc.). LST is mostly an object description language.
Sometimes it's handy to embed a formula in one of those descriptions.
Just be careful not to "blow up" the scope of the LST file handler by
wanting it to be a programming language (e.g. logic statements such as
if-then-else blocks, for() and while() loops, etc.). Here, there be
- Mark Coletti wrote:
> On Fri, 02 Jul 2004 08:45:25 -0700, Kevin BrownIf I remember correctly (no guarantee) but a--e.com was exactly right.
> <kevin_brown@...> wrote:
> > >>http://gmgen.sourceforge.net/wiki/
> > >>
> > >>I just hit that website, and the links are full of hard-core porn
> > >>sites... someone might wanna check into that.
> > >
> > >
> > > Deleted!
> > > That is so not cool.
> > The changes should be able to be rolled back thanks to it being a
> wiki page, heheh.
> QuantumGIS had the same problem recently. In fact, I wonder if it was
> the same asshat. Was the offender posting links hosted by a--e.com,
> which is Russian?
> QuantumGIS locked down its WIki. It's a PITA, but was necessary.
> Apparently this had occured regularly.
> I'm taking reality in small doses to build immunity.
> PCGen's release site: http://pcgen.sourceforge.net
> PCGen's alpha build: http://rpg.plambert.net/pcgen
> PCGen's FAQ:
> *Yahoo! Groups Sponsor*
> click here
> *Yahoo! Groups Links*
> * To visit your group on the web, go to:
> * To unsubscribe from this group, send an email to:
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.