Skip to main content
Known Participant
September 1, 2010
Answered

Syntax Error with XOR

  • September 1, 2010
  • 2 replies
  • 2572 views

Hello, my script is as follows:

public function loadBlog(XML_URL) {
           
            //Execute if either blog[1] or [2] is NULL
            if ((blogs[0] == NULL) XOR (blogs[1] == NULL)) {

                //Instance new Blog inside the actuelEmptyBlog - where array = NULL
                blogs[actualEmptyBlog] = new Blog(XML_URL);
               
                //Swap actualEmpty and actualToDisplay. After Displaying the new Blog, blogs[actualEmptyBlog] = NULL ---> changeBlog();
                this.actualBlogToDisplay = this.actualEmptyBlog;
                if (this.actualBlogToDisplay == 0) { this.actualEmptyBlog = 1; }
           
                if (this.actualBlogToDisplay == 1) { this.actualEmptyBlog = 0; }
           
            }
           
         }

The errors are: (all in line with) xor

rightparen before ANDOR missing

identifier before rightparen missing

illegal attribute

This topic has been closed for replies.
Correct answer Andrei1-bKoviI

XOR (^ in AS) is a bitwise operator. What are you trying to do? Also, it is null - not NULL.

2 replies

Andrei1-bKoviICorrect answer
Inspiring
September 1, 2010

XOR (^ in AS) is a bitwise operator. What are you trying to do? Also, it is null - not NULL.

kraöAuthor
Known Participant
September 1, 2010

I want to check, if these array-indizes are occupied or not.

kraöAuthor
Known Participant
September 1, 2010

Where can I find the manual?

September 1, 2010

try "^" instead of "xor"

kraöAuthor
Known Participant
September 1, 2010

this seems not to be a regular character, actionscript editor deletes it immediatly.

September 1, 2010

Have you typed it or copied from the forum?

Take a look at the manual for "xor".