Raised This Month: $51 Target: $400
 12% 

a little difference of AMX to AMXX


Post New Thread Reply   
 
Thread Tools Display Modes
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 03-29-2004 , 03:34  
Reply With Quote #11

Quote:
Originally Posted by BAILOPAN
XAD: hrm I guess I should not tie the two concepts together ;] I assumed that languages with garbage collection would also initialize to null

Maybe we should keep zero termination early-on to force it...
Have you changed to not do initialization by default??
If not then I would like to suggest the same thing I did to OLO...

Can you add a compiler code command to NOT initialize them??
Ex. #no_zero_init

With this option plugin authors can choose to optimize their code to be fast (if they know how to code it). For the rest of plugins coders they can code the easy (lazy and safe) way...

/X

PS! As I said before, Small do NOT have garbage collection... there are not "new", "malloc", or similar functions so there is no use of it...
XAD is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 03-29-2004 , 07:20  
Reply With Quote #12

The abstract machine doesn't initialize anything to null (would be hard to implement too). The compiler has to do that...
i know that the compiler from Small package 2.4.0 which we used in version 0.1 initialized all the variables to 0 (arrays too). The one we are using now is from an amxmod package I believe, so maybe it doesn't.


XAD: Good idea, i would look into that.. But if we want to use the new compiler, we will have to fix the "#if XX == 16" bug... i'll try to fix it . Also, i would really like to use the new compiler, because it supports 3D arrays...
__________________
hello, i am pm
PM is offline
[-Alt-]
Junior Member
Join Date: Mar 2004
Old 03-29-2004 , 07:31  
Reply With Quote #13

Quote:
Originally Posted by PM
The abstract machine doesn't initialize anything to null (would be hard to implement too). The compiler has to do that...
i know that the compiler from Small package 2.4.0 which we used in version 0.1 initialized all the variables to 0 (arrays too). The one we are using now is from an amxmod package I believe, so maybe it doesn't.
linux version of compiler in 0.16 doesn`t do it.
It caused some problems, like this:
http://forums.alliedmods.net/showthread.php?t=308
[-Alt-] is offline
BAILOPAN
Join Date: Jan 2004
Old 03-29-2004 , 10:25  
Reply With Quote #14

I think it should not be initialized to zero
__________________
egg
BAILOPAN is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 03-29-2004 , 11:50  
Reply With Quote #15

Quote:
Originally Posted by BAILOPAN
I think it should not be initialized to zero
many plugins assume it is... so I think XAD's suggestion is the best one so far ;]
__________________
hello, i am pm
PM is offline
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-29-2004 , 12:02   hrm
Reply With Quote #16

I think it did in 0.1, I kinda liked that and am looking forwar to 3d- arrys too
__________________
|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-29-2004 , 13:39  
Reply With Quote #17

yes... compiler switch sounds fine
defaulted to init 0
__________________
egg
BAILOPAN is offline
CheesyPeteza
Senior Member
Join Date: Feb 2004
Location: UK
Old 03-29-2004 , 14:11  
Reply With Quote #18

Did someone say 3 dimensional arrays? YES PLEASE
__________________
YO|Cheesy Peteza

[email protected]

CheesyPeteza is offline
BAILOPAN
Join Date: Jan 2004
Old 03-29-2004 , 14:15  
Reply With Quote #19

actually we could make it more than 3
__________________
egg
BAILOPAN is offline
CheesyPeteza
Senior Member
Join Date: Feb 2004
Location: UK
Old 03-29-2004 , 14:24  
Reply With Quote #20

I'd vote for 4 then. As with strings you effectively lose a dimension.

Enumerations are crap too, I long for structures. Perhaps I should just start coding straight for metamod.
__________________
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 12:19.


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