9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] compiling error
@ 2007-03-14  6:38 Gabriel Díaz
  2007-03-14  7:21 ` Skip Tavakkolian
  2007-03-14  9:44 ` matt
  0 siblings, 2 replies; 6+ messages in thread
From: Gabriel Díaz @ 2007-03-14  6:38 UTC (permalink / raw)
  To: 'Fans of the OS Plan 9 from Bell Labs'

Hello

In the following sample, why the commented print gives a syntax error?
cpu% 8c -FVw t.c
t.c:12 syntax error, last name: maxarg2


#include <u.h>
#include <libc.h>


static double maxarg1,maxarg2;
#define FMAX(a,b)
(maxarg1=(a),maxarg2=(b),(maxarg1)>(maxarg2)?(maxarg1):(maxarg2));

void main(void){
	float a,b,c,d;
	a=1.0; b=2.0; c=3.0; 
	d=FMAX(b,1.0);
	// print("%f", fabs(a)*FMAX(b,1.0)/c);
	print("%f", fabs(a)*d/c);
}


Thanks

Gabi




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-14  9:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-14  6:38 [9fans] compiling error Gabriel Díaz
2007-03-14  7:21 ` Skip Tavakkolian
2007-03-14  7:47   ` Gabriel Díaz
2007-03-14  8:20     ` Skip Tavakkolian
2007-03-14  8:32       ` Gabriel Díaz
2007-03-14  9:44 ` matt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).