Date: 07/26/00
- Next message: Stanislav Malyshev: "Re: [PHP-DEV] Problems in strtod() when locale is set"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] Problems in strtod() when locale is set"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] is it allowed to override default constants(TRUE,FALSE)? see bug 5217"
- Next in thread: Stanislav Malyshev: "Re: [PHP-DEV] is it allowed to override default constants(TRUE,FALSE)? see bug 5217"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi!
> At 12:10 26-07-00, waldschrott wrote:
> >>It shouldn't be allowed.
> >
> >Thus we should have an undefine() or unset() (which unsets defined vars)
> >to allow redefinition of *user*-constants, all others shouldnīt be allowed
> >to touch...
> >
> >
> >> > I get the same results, but I donīt think itīs a bug, BTW -1 is
> >> > treated as FALSE value normally...
> >>-1 is not treated as false, only 0 is treaded as false.
> >
> >I should have said, treated in my scripts as false. I use negative values
> >for error handling....
>
> They don't mean false in the language level, and we won't change that; If
> you want to give negative values a logical meaning of false in your
> scripts, then you're quite welcome to do that, but without the language's
> help :)
if fact it's a practice in C coding to have something like
status = call_function ();
if (status < 0) {
do_something();
}
so you can use negative error codes in an elegant (structured) manner.
Zeev was more kind to invite you to change your way of thinking, than say Stas, though :))
-- teodor
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Stanislav Malyshev: "Re: [PHP-DEV] Problems in strtod() when locale is set"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] Problems in strtod() when locale is set"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] is it allowed to override default constants(TRUE,FALSE)? see bug 5217"
- Next in thread: Stanislav Malyshev: "Re: [PHP-DEV] is it allowed to override default constants(TRUE,FALSE)? see bug 5217"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

