Subject:
|
Re: Type conversion IC.
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Fri, 8 Jan 1999 06:45:34 GMT
|
Original-From:
|
Aaron Edsinger <AARONE@SIRIUSihatespam.COM>
|
Viewed:
|
1109 times
|
| |
| |
You can do this in IC 3.2, perhaps not in the freeware version.
-----Original Message-----
From: Christopher Prosser <christopherprosser@yahoo.com>
To: FEDSANTE@tin.it <FEDSANTE@tin.it>; handyboard@media.mit.edu
<handyboard@media.mit.edu>
Date: Wednesday, January 06, 1999 8:18 PM
Subject: Re: Type conversion IC.
> I don't have IC handy, but you should just be able to do
> a hard cast.
> float aFloat = 1.3;
> int anInteger = 0;
> anInteger = (int) aFloat; /*cast the float to an int */
>
> /*you can also do it in a function call*/
> FuntionTakesAnInt( (int) aFloat );
>
> Hope this helps!
> -Chris Prosser
>
>
>
>
> ---FEDERICO SANTELLO <fedsante@tin.it> wrote:
> >
> > Hi to all
> > And HAPPY NEW YEAR.
> >
> > I have a question.
> > How can i convert a floating variable into a integer variable?
> > I must send via serial line the result of the functions SECONDS().
> >
> > Thank
> >
> > Federico
> >
> > E-mail:fedsante@tin.it
>
>
>
>
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|