#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12

    term does not evaluate to a function?


    the compilar doesn't like this:

    a = 3.14(r * r);
    c = 3.14(r * 2);

    It gives the error, "term does not evaluate to a function";

    When I change it to (r*r)3.14 or 3.14 * (r*r) but then it comes up with other weird errors.

    EDIT:: BY THE WAY...a and c are both floats.


    -andy
    Last edited by andy3109; March 11th, 2003 at 11:00 PM.
    hmmm...
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    ahhhh..nm i misnamed a function. damnit Im stupid tonight.
    hmmm...
  4. #3
  5. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,156
    Rep Power
    2222

    Re: term does not evaluate to a function?


    Basically, in order to multiply two terms, you simply must use an asterix. I assume that you've been burning the midnight oil.

    Originally posted by andy3109
    a = 3.14(r * r);
    c = 3.14(r * 2);
    Both statements follow the syntax of a function call --
    fn_name(argument list)
    -- so the error of "term does not evaluate to a function" makes sense. Besides, "3.14" is not a valid name for a function, which I think is the reason for that particular error.


    (r*r)3.14
    Same basic error, but this syntax doesn't mean anything in C that I know of.


    3.14 * (r*r)
    This one is valid, yet you still got an error message. Could you tell me what error this one gives you?


    EDIT:: BY THE WAY...a and c are both floats.
    Could that weird error message be a warning that you are assigned a double r-value to a float l-value and could lose precision?
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    nah..as said above I misnamed a function..it was defined as numeric() and then when I wrote the function it was called numric()..But thanks alot for your reply. Regards.

    -andy
    hmmm...

IMN logo majestic logo threadwatch logo seochat tools logo