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 / 769
    How do you convert a int to a long or float? —James M Smith
   I need to convert a int to either a long or float. I've always had a compiler that auto converts. I don't remember how to do it. I'd welcome any help. Jim (28 years ago, 26-Sep-96, to lugnet.robotics.handyboard)
   
        Re: How do you convert a int to a long or float? —Fred G. Martin
   (...) Coercion is done by putting the type you want to convert it to in parens before the thing being converted; e.g.: float f = (float) 33; int i = (int) 10.; best, Fred (28 years ago, 26-Sep-96, to lugnet.robotics.handyboard)
 

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