ricardocabellov5.0balter-egos
trace mr.doob r08028
blogdemoscenefeaturedextrascontact
 *blog... kind of... *rss

« Common GUI design mist...Steamboy »

Bizarre Actionscript #1
06.02.2006
Never create/use a variable/object with "3d" in the begining of the name ("3dXX"). It won't work.
posted by mr.doob at 14:56
7 comments written so far

Actionscript follows ECMA4 specs mostly so in theory any variable starting with a number should fail I think.
posted by Andy
06.02.2006 , 15:03

Thanks!
Nice to know that!
posted by mr.doob
06.02.2006 , 15:06

now that i remember that's because of how the compilers are built... everything which begins with a number is a number and will be evaluated like that... anything else might be considered
posted by sole
06.02.2006 , 15:36

I see, I guess is for optimizations then...
posted by mr.doob
06.02.2006 , 15:38

well know that you are curious about it... compilers have a series of possible status when evaluating the input tokens, so they need to distinguish if each token is a variable, a reserved word or whatever, and if the syntax is ok too.
And that's what a parser does :D
Checks the type of each token and verifies if it is in a proper position.
posted by sole
06.02.2006 , 15:53

Como nomenclaturas hay millones, te explico la mia para las variables:

- si es un númerico será nVariable
- si es un string será sVariable
- si es un objeto será oObjeto
- si es un array será aArray
- si es "booleano" será bVariable

... creo que así me evito algunos errores en los nombres y a veces hasta comprendo mi codigo despues de meses... pero solo a veces... :D
posted by humphr3y
06.02.2006 , 17:25

Notación humpr3yhúngara 8)
posted by r3d
06.02.2006 , 23:21

SORRY!
Is not that I don't care about what you have to say, of course I do, but they are speaking louder and I lost my patience :(
 *profile 



traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here


 *latest posts 

* Showcase is back, now in Javascript (19.11.2008)
* Zeh's Fnk (15.11.2008)
* Lupen III (Italian Opening) VS Captain... (08.11.2008)
* Duuuuude! (31.10.2008)
* Pump 'N Seal, Jackie Chan, Manuela and... (26.10.2008)
* Ubuntu 8.10 on a Macbook Pro (25.10.2008)
* Ubuntu 8.04, Apple Keyboard - Change F... (22.10.2008)
* Rules for making the internet a better... (21.10.2008)
* The Magic of Viral (10.10.2008)
* Jonathan Harris: Beyond Flash, an adde... (06.10.2008)
* Zeitgeist: Addendum (05.10.2008)
* Crisis (03.10.2008)
* Youtube, now in Super HD! (30.09.2008)
* Adobe AIR for Linux - Beta (28.09.2008)
* What does the Google Chrome logo inspi... (28.09.2008)


 *latest comments 

* C++, SDL Coding? Maybe.. ;) (Preview) (trace)
* C++, SDL Coding? Maybe.. ;) (Preview) (Joey)
* La picaresca (spt)
* Mr. Slip Up (ricardo)
* La picaresca (ricardo)
* La picaresca (spt)
* La picaresca (sole)
* Demoscene @ Cirsa (sml)
* La picaresca (humphr3y)
* La picaresca (alfio)
* fiver2's new baby: debris (Jcl)
* Barcelona = full of shit(s) (Soli)
* Demoscene @ Cirsa (Scener)
* Rar & unrar with Ubuntu (SethPlate)
* Mindcandy 2 (Jcl)


 *wish list