Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
This page was last modified 09:00, 18 May 2008.

Format a Real Number

From Forum Nokia Wiki

You have a Real Number with a huge value. You would like to format at as you like by using the following code

const TInt KRealNumberFigureAmount = 2;
const TInt KRealNumberWidth = 8;
 
TRealFormat format;
format.iPlaces = KRealNumberFigureAmount;
format.iWidth = KRealNumberWidth;
format.iType = KRealFormatGeneral | KDoNotUseTriads;
 
TReal Longitude = (a large real number); //Pseudo assignment
TReal Latitude =(a large real number) ; //Pseudo assignment
 
TBuf8<32> ValueBuffer; 
ValueBuffer.AppendNum( Longitude, format);
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZseriesE5f60Q
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX