TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Michael Stapleton
from: Bob Lawrence
date: 1996-12-19 09:28:56
subject: qsort

BL> #define wrand() (rand() & SHRT_MAX)
 BL> ...     ^^^^^^^  it didn't like wrand(z) and rand(z) and I can
 BL> ... understand that. I don't like it either.

 MS> This was an attempt at a portable rand() that returns a short int
 MS> because my rand() returns a 32 bit int.

 MS> I don't understand why it complained about the z, though, since
 MS> wrand() is not "called" with an argument.

  I'm not game to ignore my compiler. It's polite, but if you ignore
it terrible things happen!

 BL> I must have been mixing up two problems but now it works, it
 BL> makes sense, and I am no longer confused.

 MS> Excellent!

  It's another miracle...

Regards,
Bob
 
___ Blue Wave/QWK v2.12
@EOT:

---
* Origin: Precision Nonsense, Sydney (3:711/934.12)
SEEN-BY: 711/934 712/610
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.