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

Posted by gosha bine on 06/24/07 22:51

yawnmoth wrote:
> 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?
>
RAND_MAX is not a php constant, it's defined in the standard C library
and is platform dependent. For example, on windows it's only 32767.



--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

 

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

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