delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/25/04:01:38

Date: Wed, 25 Jun 1997 11:01:05 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: dabrownz AT mindspring DOT com
cc: djgpp AT delorie DOT com
Subject: Re: My second function doesn't work (stupid newbie question)
In-Reply-To: <33ac9f87.20873600@news.mindspring.com>
Message-ID: <Pine.SUN.3.91.970625105939.10784F-100000@is>
MIME-Version: 1.0

On Sun, 22 Jun 1997 dabrownz AT mindspring DOT com wrote:

> DJGPP keeps telling me that there is something wrong with my second
> function.  I don't see why.  Please help, I'm a stupid newbie and I'll
> appriciate any help (the answer is probably right under my nose)

Please make a good-faith effort to at least ask questions correctly.
``something is wrong with my second function''?  Come on, you should
know better than that!  Effectively, what you tell us is this:  Here's
my code; why won't you guys copy it to your development machine, try
to compile it, see the error messages, search the docs to find out
what's wrong, correct whatever needs to be corrected, recompile to
verify you're getting your stuff right, then tell my poor newbie soul
what to do."

This is NOT a free hotline.  Please do not forget this and include in
your questions any information you can possibly give us to make our
job helping you as easy as it can get.  It is hard enough to
second-guess problems of others from the other side of the world even
if you do report all the relevant info.  Please don't make it harder
by posting incomplete information.

>    return (s(s - a)(s - b)(s - c));
             ^^^^^^^^^^^^^^^^^^^^^^
This is C, not an algebraic expression evaluator.  C doesn't
understand such syntax, you need to use the multiplication operator
explicitly:

	return s*(s - a)*(s - b)*(s - c);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019