Constant booleans true/false?

elmstfreddie

The Finglonger
Reaction score
203
I opened the common.j, only to see
Code:
    constant boolean            FALSE                           = false
    constant boolean            TRUE                            = true
Doesn't that imply that whenever you enter true/false it's actually accessing at a variable that is true or false???
I guess this isn't really important, but I'm curious.
 

Sim

Forum Administrator
Staff member
Reaction score
534
I guess so they did it because in some other programming languages (I believe), true and false are in caps.

Or not :p

Either way, the main point is that you can type them in caps.
 

elmstfreddie

The Finglonger
Reaction score
203
So pretty much typing TRUE/FALSE would be like using a bj, and typing true/false is like using a native?
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Yup:
TRUE = true
FALSE = false

------

It doesn't make a difference because they both return the same value. But ya can't do this:
TrUe or FaLsE

------

Here's another example:
JASS:
    // human heroes
    constant integer ARCHMAGE           = 'Hamg'
    constant integer PALADIN            = 'Hpal'
    constant integer MTN_KING           = 'Hmkg'
    constant integer BLOOD_MAGE         = 'Hblm'


They all still return the rawcode. :D
 
A

Aw2k6

Guest
Does Vexorian's Optimizer in-lines all raw-code constants, such as these true/TRUE as well as the constant integer rawcodes?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top