Re: declaring an unsigned int

From: Date: Fri, 22 Dec 2000 04:40:32 +0000
Subject: Re: declaring an unsigned int
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-31536@lists.php.net to get a copy of this message
Try the absolute function: http://www.php.net/manual/html/function.abs.html you ought to make sure your variable is always positive with this ----- Original Message ----- From: "Cynic" <cynic@mail.cz> To: "Curts" <rob@siliconcarne.net>; <php-general@lists.php.net> Sent: Thursday, December 21, 2000 5:15 PM Subject: Re: [PHP] declaring an unsigned int > PHP is a very loosely typed language. This has both pros and > cons, depending on what you're trying to achieve at any given > moment. > > At 23:03 21.12. 2000, Curts wrote the following: > -------------------------------------------------------------- > >aha... i was hoping there would be a way to make sure a variable always stays > >positive, rather than constantly checking it. > > > >thanks anyways > > > >On Thu, 21 Dec 2000, Cynic wrote: > >> you can't > >> > >> At 22:43 21.12. 2000, Curts wrote the following: > >> -------------------------------------------------------------- > >> >How can you specify an integer to be unsigned? > >> > > >> >Rob > >> >-- > >> >/** > >> > * Rob Curts > >> > * rob@siliconcarne.net > >> > * http://www.siliconcarne.net/ > >> > * Siliconcarne > >> > * internet software solutions > >> > * Cambridge, MA > >> > */ > >> > > >> >-- > >> >PHP General Mailing List (http://www.php.net/) > >> >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >> >For additional commands, e-mail: php-general-help@lists.php.net > >> >To contact the list administrators, e-mail: php-list-admin@lists.php.net > >> ------end of quote------ > >> > >> > >> > >> ____________________________________________________________ > >> Cynic: > >> > >> A member of a group of ancient Greek philosophers who taught > >> that virtue constitutes happiness and that self control is > >> the essential part of virtue. > >> > >> cynic@mail.cz > >> > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >> For additional commands, e-mail: php-general-help@lists.php.net > >> To contact the list administrators, e-mail: php-list-admin@lists.php.net > >-- > >/** > > * Rob Curts > > * rob@siliconcarne.net > > * http://www.siliconcarne.net/ > > * Siliconcarne > > * internet software solutions > > * Cambridge, MA > > */ > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >For additional commands, e-mail: php-general-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > ------end of quote------ > > > > ____________________________________________________________ > Cynic: > > A member of a group of ancient Greek philosophers who taught > that virtue constitutes happiness and that self control is > the essential part of virtue. > > cynic@mail.cz > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#31536) next »