Re: newbie C question

From: Whitey (zacker@ACSU.BUFFALO.EDU)
Date: 07/13/97


Um, you dont need to type-cast that statment.  Since GET_LVL returns an
integer, and both '10' and '1' are integers, the whole expression will be
an integer.

Whitey

On Sun, 13 Jul 1997, Justin wrote:

> Hello again folks.
>
> Really simple and quick question here.  I'm type-casting and using defines
> to get my number.  How should the ()'s be placed?  Here's an example of
> what I'm doing:
> should it be:   (int)(GET_LVL(ch) / 10) + 1;
> or should it be:(int)(GET_LVL(ch)) / 10 + 1;
>
> sorry for such a simple question.
> TIA
> Salvatore
>


      +-----------------------------------------------------------+
      | Ensure that you have read the CircleMUD Mailing List FAQ: |
      |   http://cspo.queensu.ca/~fletcher/Circle/list-faq.html   |
      +-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST