You are here: Re: RAND_MAX « PHP Programming Language « IT news, forums, messages
Re: RAND_MAX

Posted by Michael Fesser on 06/24/07 16:50

..oO(yawnmoth)

>According to php.net, mt_rand() and rand()'s$max value is, by default,
>RAND_MAX. This suggests to me that RAND_MAX is a constant, however,
>the following PHP script shows this not to be the case:
>
><?php
>echo defined('RAND_MAX') ? 'defined' : 'not defined';
>?>
>
>Any ideas as to why this is?

Just because something is written in caps in the manual doesn't
necessarily mean that it's a PHP constant. It could also be a system-
dependent constant in the C source code.

Micha

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация