×
Namespaces

Variants
Actions

Format a Real Number

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: senthil_k (15 May 2008)
Last edited: hamishwillee (30 May 2013)

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);
This page was last modified on 30 May 2013, at 07:33.
39 page views in the last 30 days.
×