Raised This Month: $ Target: $400
 0% 

Whats Better?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-28-2004 , 19:54   Whats Better?
Reply With Quote #1

Witch one of these statements are Better in this case?

Quote:
equal(test[0],"2")

or

test[0] == 2
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
BAILOPAN
Join Date: Jan 2004
Old 03-28-2004 , 20:22  
Reply With Quote #2

they are entirely different.
equal(test[0],"2")
this sees if the character "2" is the first character in the string test

test[0] == 2
this sees if the first byte of the array test is a 2
__________________
egg
BAILOPAN is offline
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-28-2004 , 20:32   lol
Reply With Quote #3

I kow but

new test[]
test[0] = 2

equal(test[0],"2")

or

test[0] == 2

wouldn't they both come out true?
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
CheesyPeteza
Senior Member
Join Date: Feb 2004
Location: UK
Old 03-28-2004 , 21:56  
Reply With Quote #4

Nope.

Character:
new test[] = "2"

Integer:
new test[] = 2

Float:
new Float:test[] = 2.0

equal() is only for comparing character arrays.
__________________
YO|Cheesy Peteza

[email protected]

CheesyPeteza is offline
Reply



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 03:22.


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