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
768  |  770
Subject: 
How do you convert a int to a long or float?
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 26 Sep 1996 03:17:13 GMT
Original-From: 
James M Smith <james@www-gateway./nomorespam/eng.ohio-state.edu>
Viewed: 
1516 times
  
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



Message has 1 Reply:
  Re: How do you convert a int to a long or float?
 
(...) 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)

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