9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: matt <mattmobile@proweb.co.uk>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] compiling error
Date: Wed, 14 Mar 2007 09:44:03 +0000	[thread overview]
Message-ID: <45F7C3E3.9080902@proweb.co.uk> (raw)
In-Reply-To: <01c401c76603$5335ac70$f9a10550$@com>

cpp is your friend

cat | cpp -P << EOF
static double maxarg1,maxarg2;
#define FMAX(a,b) 
(maxarg1=(a),maxarg2=(b),(maxarg1)>(maxarg2)?(maxarg1):(maxarg
2));
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);
}
EOF

static double maxarg1,maxarg2;
void main(void){
        float a,b,c,d;
        a=1.0; b=2.0; c=3.0;
        
d=(maxarg1=(b),maxarg2=(1.0),(maxarg1)>(maxarg2)?(maxarg1):(maxarg2));;
        print("%f", 
fabs(a)*(maxarg1=(b),maxarg2=(1.0),(maxarg1)>(maxarg2)?(maxarg1):(maxarg2));/c);
}




      parent reply	other threads:[~2007-03-14  9:44 UTC|newest]

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

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=45F7C3E3.9080902@proweb.co.uk \
    --to=mattmobile@proweb.co.uk \
    --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).