Re: [Circle] SEMI-NEWBIE QUESTION: Circle Data types???

From: Limratana (wlimrata@merlin.cc.manhattan.edu)
Date: 07/27/96


(int) is a cast operator.  What that means is that during a calculation, 
the variable after (int) is turned into an int for compatibility with
whatever you are assigning the value to.  For instance, 
int i;
float k, l;

k= 1.2;
l= 3.456;

i= (int) k * (int) l;
or maybe you want 
i = (int) (k * l);
this ensures that a float doesn't end up being assigned to an integer 
variable.  There might be other uses for (int) that I don't know about too.

+-----------------------------------------------------------+
| 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/07/00 PST