Clay Dagler
Posts: 21
Nickname: cdagler
Registered: Jul, 2003
|
|
Re: Assert in java
|
Posted: Apr 2, 2004 8:19 PM
|
|
> Hi people > im having a problem to compile my program > public int tokenToInt () > { > Assert( IsNumber ) : "Tokens.TokenToInt: wrong kind of > of Token!" > return Value; > } > > My compiler is having a problem recognising the : after > the Assert(IsNumber)
Just by looking at java.sun.com Assert should be in the form: Assert booleanExpression : Expression;
so, assuming IsNumer is a boolean I think Assert IsNumber : "Tokens.TokenToInt: wrong kind of Token!";
should work.
|
|