Re: [fpc-pascal] Random(), Randomize, and Linux permissions

2004-09-30 Thread Jonas Maebe
On 29 sep 2004, at 21:03, Alan Mead wrote:
Hence my attempt to use /dev/urandom.  I had suggested this in a
discussion on this list about a year ago and I thought I would try to
implement it now...  I acknowledge the limitations of this approach..
maybe it would be easier to just stick a 1 sec delay before the
randomize :)
You could use a number from /dev/random or /dev/urandom to initialize 
randseed (that's just a global variable in the system unit, which is 
the only thing that randomize() changes when you call it), instead of 
randomize(). Then you'll get the best of both worlds.

Jonas
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] RE: Random(), Randomize, and Linux permissions

2004-09-30 Thread Jonas Maebe
On 30 sep 2004, at 05:29, Alan Mead wrote:
Thanks for this link.  I found a Pascal implementation of MT
somewhere .. not this one I think.  Is it your code?  Do you know the
difference between the Real1() and Real2() etc. methods?
The 1.9.x FPC rtl already uses the Mersenne Twister. However, that 
doesn't change the need of having to get an initial random seed from 
somewhere.

Jonas
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Known issue with 1.9.4 [2004/05/30] for i386 on Linux?

2004-09-30 Thread Nico Aragón
Hello,

On Wed, 29 Sep 2004 20:23:13 -0700 (PDT), Alan Mead wrote:

>>   while ( (i<=Length(fmt)) and (NOT fmt[i] IN ['0'..'9']) ) do
>> inc(i);
>First, it seems improper for any syntax to compile (i.e., to fail to
>raise a syntax error) and then not execute. 

It compiles because it has the meaning that David said. The "not"
operator is applied to fmt[i]. 

>Second, I had to track this down by inserting a bunch of lines like
>"writeln('Passed 33');".  The code was compiled with -gl so I should
>see a line number but none is shown.  This seems like a bug.  

>Third, the RTE, "Invalid variant operation" seems inappropriate and
>confusing.  Again, maybe there's an implicit conversion... (but is it
>appropriate?)

The "not" operator applies to integers, performing a bitwise not. In
your code it's applied to a character, so the conversion is probably
from char to integer.  Useful when doing f.i. compression or
encryption. 

If it's inappropiate or not, I don't know.



--
saludos,
  
  Nico Aragón

NOTE: na-list address only works for messages coming from lists.
Please, write to "nico" at the same domain for direct email.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Free Pascal soom will land in Italy!

2004-09-30 Thread Florian Klaempfl
Jilani Khaldi wrote:
Hi All,
In the next issue of Linux&C n.42 (http://www.oltrelinux.com) there will 
be the first article (Special) about Free Pascal (8 pages for this 
article, never happened before with other cool languages). Linux&C is 
the number one magazione in Italy dedicated to Linux with nearly 50.000 
readers monthly. I am looking for a cool application (already written or 
to be written) to show to our readers (in the next articles) the power 
and the elegance of Free Pascal for serious development. 
FPC itself ;)?
Lazarus =) ?
Tony's CBT?
Please let me 
know if you know about any. Let's spear Free Pascal!
Jilani


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal