Raised This Month: $ Target: $400
 0% 

Code syntax to reset variables to zero?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-22-2009 , 14:41   Re: Code syntax to reset variables to zero?
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
They both do the same operation.
Actually, this is not quite true. The second statement stores 0 in the DAT section and pushes it onto the stack three times, whereas the first only stores it once. So the operation in assembly will be, in pseudocode (cus I'm too lazy to write it up in proper ASM):

PHP Code:
DAT
adr001 0
adr002 0
adr003 0

CODE
array=adr001
array+1=adr002
array+2=adr003 
Whereas the other will look like:

PHP Code:
DAT
adr001 0

CODE
array+2=adr001
array+1=array+2
array=array+
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 17:40.


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