Raised This Month: $ Target: $400
 0% 

Problem with Float in checking its figures


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-18-2019 , 23:42   Re: Problem with Float in checking its figures
Reply With Quote #10

Quote:
Originally Posted by Natsheh View Post
it really depends on how smart the compiler is, for AMXX its stupid, if(a = 5) since its in a if statement it should be comparing and since pawn in amxx doesnt support data types there are no reason for double equal chars for comparing....

also beside pawn uses only unsign data type.........
Umm . . no. One equal sign is assignment, two is for comparison. The compiler should not promote bad coding practices and should tell you that you might be doing it wrong. If a language did do that, I'd consider it a poorly designed language.

Also, when used as integers (e.g. untagged variables) are signed integers. How else are you going to get -1? I never seen a mechanism to force them to be unsigned (granted, I've never search for it either).
__________________

Last edited by fysiks; 11-18-2019 at 23:44.
fysiks is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode