HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Create comparative keyword?

07-07-2010, 09:16 PM#1
Themerion
Is it possible to make comparative keywords in vJASS? More specifically, I want to do this:

Collapse JASS:
if (a xor b) then

Instead of:

Collapse JASS:
if XOR(a,b) then
07-07-2010, 09:18 PM#2
Anitarf
if (a and not b) or (b and not a) then
07-08-2010, 02:59 PM#3
Themerion
That would be even uglier... (consider when a and b are larger expressions; would be rather redundant). Sorry for not being very clear on what I'm after...

I guess it's not possible then?
07-08-2010, 03:50 PM#4
Anitarf
Quote:
Originally Posted by Themerion
That would be even uglier... (consider when a and b are larger expressions; would be rather redundant).
If they are larger expressions, you could store them in local variables.
07-08-2010, 05:04 PM#5
ProFeT
Quote:
Originally Posted by Themerion
Is it possible to make comparative keywords in vJASS? More specifically
We call them "operators", and no, it isn't possible to create new jass operators :/
07-08-2010, 08:09 PM#6
Themerion
Quote:
Originally Posted by Anitarf
If they are larger expressions, you could store them in local variables.

That would work. Although you would get two additional lines of code for declaring and two additional lines of code for assigning.

I guess it comes down to preference. To me, XOR is much easier to perceive than an expression with the logic behind it. I suppose to a total n00b, XOR would be more confusing...

Quote:
We call them "operators"

>.<

Oh well, I'm just happy my wording was understandable.