9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Gabriel Díaz" <gabidiaz@gmail.com>
To: "'Fans of the OS Plan 9 from Bell Labs'" <9fans@cse.psu.edu>
Subject: [9fans] compiling error
Date: Wed, 14 Mar 2007 07:38:03 +0100	[thread overview]
Message-ID: <01c401c76603$5335ac70$f9a10550$@com> (raw)

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




             reply	other threads:[~2007-03-14  6:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14  6:38 Gabriel Díaz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01c401c76603$5335ac70$f9a10550$@com' \
    --to=gabidiaz@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).