analog input and while statement

Hi all, My program seems to be stuck in a while loop. Can anyone tell me what is wrong with this;

while (a=1023){
a = analogRead(A0);
}
Serial.println(a);

The analog reads are varying and not stuck on 1023. Earlier in the program 'a' is printing out ok. But after this while statement 'a' is not printing out.
The definition of while clearly states that sensor inputs can be included in a while statement.

"=" is the assignment operator
"==" is the equality comparison operator

a = analogRead(A0);

is the same as

a = 14; // on an Uno

Leo..