[futurebasic] Re: [FB] error message

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2006 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Wed, 1 Mar 2006 23:01:41 +1300
Edwards, Waverly wrote:

> I was looking at some of the error messages I generated and  
> wondered, what would be considered semantic errors in FB?   
> Syntactic errors are easy enough to identify and the compiler will  
> happily let you know about them but I couldnt think of a single  
> semantic error.

gcc can warn of a common semantic mistake. Here the programmer  
probably meant ( x == 3 ).

int TestFor3( int x )
{
	if ( x = 3 ) return 1;
	return 0;
}

gcc says, obliquely, "warning: suggest parentheses around assignment  
used as truth value"

Robert P.