[ nice-Bugs-1834805 ] random function compiler error - more

"SourceForge.net" <[email protected]> Sun, 25 Nov 2007 09:28:49 -0800
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #1834805, was opened at 2007-11-19 22:57
Message generated for change (Comment added) made by bonniot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1834805&group_id=12788

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Isaac Gouy (igouy)
>Assigned to: Daniel Bonniot (bonniot)
Summary: random function compiler error - more

Initial Comment:
Found the problem!

This gives the compiler error:

double random(double m) = m;


This compiles just fine:

double r(double m) = m;


See #1834802

----------------------------------------------------------------------

>Comment By: Daniel Bonniot (bonniot)
Date: 2007-11-25 18:28

Message:
Logged In: YES 
user_id=88952
Originator: NO

Thanks for the report. I just fixed it in CVS! (yes, it's been a while
since I last did that :-))


----------------------------------------------------------------------

Comment By: Isaac Gouy (igouy)
Date: 2007-11-20 18:41

Message:
Logged In: YES 
user_id=536291
Originator: YES

Yes and of course it's not acceptable for that to crash the compiler ;-)

I closed the duplicates 1834802 and 1625863.

----------------------------------------------------------------------

Comment By: Artem Gr Kozarezov (artemgr)
Date: 2007-11-20 18:26

Message:
Logged In: YES 
user_id=289741
Originator: NO

Might be that somehow the local "random" conflicts with the function
defined in "nice/lang/numeric.nice". From numeric.nice:

/** Returns a random number such that 0 <= random(limit) < limit. */
int random(int limit) = int(floor(random() * limit));

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1834805&group_id=12788

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/