Subject:
|
Re: Type conversion IC.
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Thu, 7 Jan 1999 03:45:01 GMT
|
Original-From:
|
Christopher Prosser <christopherprosser@yahoo.com*stopspammers*>
|
Reply-To:
|
CPROSSER@ACM.spamcakeORG
|
Viewed:
|
1079 times
|
| |
| |
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
|
|
|
|