3 Replies Latest reply on Jun 22, 2010 6:18 AM by miguel8312-3K1O2b

    syntax !variable

    miguel8312 Level 3

      i often time see syntax like this...!variableName can someone please tell me what this stands for... it seems shorthand for something but im not sure i get it sorry for my ignorance your reponse is greatly appreciated.


        • 1. Re: syntax !variable
          David_F57 Level 5



          ! = is not


          so if myTest = false;


          !myTest  evaluates to true (basically the opposite)


          if (myTest == false) is the same as if(!myTest)



          • 2. Re: syntax !variable
            BhaskerChari Level 4

            Hi miguel8312,


            As David said in his earliar post hope you have understood its significance...and I just want to add few more points


            we can also use ! symbol the follwing way...


            var someVariable:String;

            if(!someVariable) is equivalent to using  if(someVariable == null)


            var someVariable:String="";// empty string

            if(!someVariable) is equivalent to using  if(someVariable == "")



            Bhasker Chari

            1 person found this helpful
            • 3. Re: syntax !variable

              thank you both i really appreciated this was killing me I kept seeing in others actionscript code but i didnt want to assume... Thank for your replies and sharing.