Re: define (true/false)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Exactly,
CONSTANTS are ... "eternal truths" to the program, they shouldn't change, constants should not be changing based on arguments being passed, or other variables. by definition, it's no longer a constant, and a misuse of the define () function.




On Jul 28, 2005, at 8:46 AM, Jay Blanchard wrote:

[snip]

WHY?
[/snip]

[moresnip]
But you would never want to use a variable to determine a constant
because the variable is not likely to be the same (that is why we call
them variables) on any iteration. Using constants in expressions is OK,
for instance

if(BAR == $foo){
   ...stuff...
}

But modifying a constant is a no-no.
[/moresnip]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux