To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 2613
2612  |  2614
Subject: 
Re: type conversion
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Wed, 13 Aug 1997 16:25:42 GMT
Original-From: 
Tom Brusehaver <tomb@augusta.netperceptions.[AntiSpam]com>
Viewed: 
1545 times
  
D> Hello, Does IC do type conversions like C?  More specifically, if
D> I have a persistent int that needs to become a global float to be
D> used by a function, can this code do the conversion?

D> persistent int ifactor;
D> float factor;

D> void foo(void)
D> {
D> ifactor = 10;
D> factor = 1.0 * ifactor;
D> }

Probably a better cheaper way would be to use type coercion:


persistent int ifactor;
float factor;

void foo(void)
{
ifactor = 10;
factor = (float)ifactor;
}



Message is in Reply To:
  type conversion
 
Hello, Does IC do type conversions like C? More specifically, if I have a persistent int that needs to become a global float to be used by a function, can this code do the conversion? persistent int ifactor; float factor; void foo(void) { ifactor = (...) (27 years ago, 13-Aug-97, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR