00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #include <e32std.h>
00044 #include <e32base.h>
00045 #include <charconv.h>
00046 #include <platform/collate.h>
00047
00049 #include "stringrenderer_symbian.h"
00050 #include "descriptorexamples_symbian.h"
00051
00058 #define RenderVariableString(aVariableName) \
00059 RenderVariableFormatted(aVariableName, output, KRenderDefault);
00060
00061 #define RenderVariableBinary(aVariableName) \
00062 RenderVariableFormatted(aVariableName, output, KRenderContentAsBinary);
00063
00064 #define RenderResult(aDeclaration) \
00065 RenderResultFormatted(aDeclaration, output, KRenderDefault);
00066
00067 #define ExecuteAndRenderVariable(aDeclaration, aVariable) \
00068 ExecuteAndRenderVariableFormatted(aDeclaration, aVariable, output, \
00069 KRenderDefault );
00070
00075 void CDescriptorExamples::NonModifyingMethods()
00076 {
00077 _LIT(KNonModifyingMethods,"NonModifyingMethods");
00078 TPtr output( iViewer->GetViewBuffer() );
00079 RenderHeader( KNonModifyingMethods, output );
00080
00081
00082
00083 _LIT(KCharacters, "abcdefghijklmnopqrstuvwxyz0123456789");
00084
00085 const TDesC &str = KCharacters();
00086 RenderVariableString(str);
00087
00088
00089 _LIT(KCapacityMsg,"\nCapacity...\n");
00090 output.Append( KCapacityMsg );
00091
00092
00093 RenderResult( str.Length() );
00094
00095
00096
00097 RenderResult( str.Size() );
00098
00099
00100 _LIT(KExtractionMsg,"\nExtracting portions...\n");
00101 output.Append( KExtractionMsg );
00102
00103
00104
00105 RenderResult( str.Left(2) );
00106 RenderResult( str.Left(5) );
00107
00108
00109
00110 RenderResult( str.Right(2) );
00111 RenderResult( str.Right(12) );
00112
00113
00114
00115 RenderResult( str.Mid(2,6) );
00116 RenderResult( str.Mid(33,3) );
00117
00118
00119 RenderResult( str.Mid(28) );
00120 RenderResult( str.Mid(35) );
00121
00122
00123 _LIT(KLocatingMsg, "\nLocating character...\n");
00124 output.Append( KLocatingMsg );
00125
00126
00127 _LIT(KString, "1ABAD");
00128 RenderResult( str.Locate('d') );
00129 RenderResultFormatted( KString().Locate('A'),
00130 output, KRenderDefault);
00131 RenderResultFormatted( KString().LocateReverse('A'),
00132 output, KRenderDefault);
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 _LIT(KCompareMsg, "\nCompare()\n");
00143 output.Append( KCompareMsg );
00144
00145
00146 _LIT(KString1, "aaa");
00147 RenderResultFormatted( str.Compare( KString1 ),
00148 output, KRenderDefault);
00149
00150
00151 _LIT(KString2,"zzz");
00152 RenderResultFormatted( str.Compare( KString2 ),
00153 output, KRenderDefault );
00154
00155
00156 RenderResult( str.Compare(str) );
00157
00158
00159 _LIT(KString3,"ab");
00160 RenderResultFormatted( str.Left(2).Compare(KString3),
00161 output, KRenderDefault);
00162
00163
00164
00165 _LIT(KString4,"AB");
00166 RenderResultFormatted( str.Left(2).Compare(KString4),
00167 output, KRenderDefault );
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182 _LIT(KCollatedCmpMsg,"\nCompareC()...\n");
00183 output.Append( KCollatedCmpMsg );
00184
00185
00186 RenderResultFormatted( KString3().CompareC(KString4,1,NULL),
00187 output, KRenderDefault );
00188
00189
00190
00191
00192 RenderResultFormatted( KString3().CompareC(KString4,2,NULL),
00193 output, KRenderDefault );
00194 RenderResultFormatted( KString3().Compare(KString4),
00195 output, KRenderDefault );
00196
00197
00198
00199
00200
00201 TCollationMethod stdMethod = *Mem::CollationMethodByIndex(0);
00202
00203
00204 TCollationMethod strictMethod = stdMethod;
00205 strictMethod.iFlags |= TCollationMethod::EIgnoreNone;
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216 _LIT(KString5, "a b");
00217 _LIT(KString6, "A B");
00218 RenderResultFormatted( KString5().CompareC(KString6,1,&stdMethod),
00219 output, KRenderDefault );
00220 RenderResultFormatted( KString5().CompareC(KString6,1,&strictMethod),
00221 output, KRenderDefault );
00222
00223 iViewer->UpdateView();
00224 }
00230 void CDescriptorExamples::ModifyingMethodsL()
00231 {
00232
00233 TPtr output( iViewer->GetViewBuffer() );
00234 _LIT(KModifyingMethods, "ModifyingMethods");
00235 RenderHeader( KModifyingMethods, output );
00236 TBuf<10> buf10;
00237
00238
00239 _LIT(KCharacteristicsMsg, "\nCharacteristics of buffer after initialization:\n");
00240 output.Append( KCharacteristicsMsg );
00241 RenderResult( buf10.MaxLength() );
00242 RenderResult( buf10.MaxSize() );
00243 RenderResult( buf10.Length() );
00244 RenderResult( buf10.Size() );
00245
00246 _LIT(KHello, "Hello");
00247 TBuf<20> example(KHello);
00248 RenderVariableFormatted( example, output, KRenderCharacteristics );
00249
00250
00251 _LIT(KFillMsg, "\nLet's fill the buffer\n");
00252 output.Append( KFillMsg );
00253 buf10.Fill( '*', buf10.MaxLength() );
00254 RenderVariableString( buf10 );
00255 RenderResult( buf10.Length() );
00256 RenderResult( buf10.Size() );
00257
00258 _LIT(KLengthManipulateMsg, "\nNow manipilate the length:\n");
00259 output.Append( KLengthManipulateMsg );
00260
00261
00262 ExecuteAndRenderVariable( buf10.SetLength(3), buf10 );
00263 ExecuteAndRenderVariable( buf10.SetMax(), buf10 );
00264 ExecuteAndRenderVariable( buf10.Zero(), buf10 );
00265
00266
00267 _LIT(KCopyMsg, "\nCopying...\n");
00268 output.Append( KCopyMsg );
00269
00270 _LIT8(KNarrowHello, "hello");
00271 TPtrC8 narrowHello( KNarrowHello );
00272 RenderVariableString( narrowHello );
00273
00274 _LIT16(KWideHello, "unIc heLLo");
00275 TPtrC16 wideHello( KWideHello );
00276 RenderVariableString( wideHello );
00277
00278 ExecuteAndRenderVariable( buf10.Copy(narrowHello), buf10 );
00279
00280 ExecuteAndRenderVariable( buf10.Copy(wideHello), buf10 );
00281
00282
00283 ExecuteAndRenderVariable( buf10.CopyCP(wideHello), buf10 );
00284
00285 ExecuteAndRenderVariable( buf10.CopyLC(wideHello), buf10 );
00286
00287 ExecuteAndRenderVariable( buf10.CopyUC(wideHello), buf10 );
00288
00289
00290 _LIT(KRepeatMsg, "\nRepeating...\n");
00291 output.Append( KRepeatMsg );
00292
00293 _LIT(KaBc, "aBc");
00294 TPtrC abc( KaBc );
00295 RenderVariableString( abc );
00296
00297 ExecuteAndRenderVariable( buf10.Repeat((TText*)abc.Ptr(),2), buf10 );
00298
00299 ExecuteAndRenderVariable( buf10.Repeat(abc), buf10 );
00300
00301
00302 _LIT(KJustifyMsg, "\nJustifying...\n");
00303 output.Append( KJustifyMsg );
00304 RenderVariableString( abc );
00305
00306 ExecuteAndRenderVariable( buf10.Justify(abc,8,ELeft,'_'), buf10 );
00307 ExecuteAndRenderVariable( buf10.Justify(abc,8,ECenter,'*'), buf10 );
00308 ExecuteAndRenderVariable( buf10.Justify(abc,10,ERight,'.'), buf10 );
00309
00310
00311 _LIT(KRenderingMsg, "\nRendering numbers...\n");
00312 output.Append( KRenderingMsg );
00313
00314 ExecuteAndRenderVariable( buf10.Num(12345), buf10 );
00315
00316 ExecuteAndRenderVariable( buf10.Num(65300,EHex), buf10 );
00317
00318 ExecuteAndRenderVariable( buf10.Num(55,EBinary), buf10 );
00319
00320 ExecuteAndRenderVariable( buf10.NumUC(65300,EHex), buf10 );
00321
00322 ExecuteAndRenderVariable( buf10.NumFixedWidth(25,EDecimal,6), buf10 );
00323
00324 ExecuteAndRenderVariable( buf10.NumFixedWidth(0xf05,EHex,6), buf10 );
00325
00326 ExecuteAndRenderVariable( buf10.NumFixedWidth(3,EBinary,8), buf10 );
00327
00328 ExecuteAndRenderVariable( buf10.NumFixedWidthUC(0xf05,EHex,6), buf10 );
00329
00330
00331 TInt64 longNum(0x12345678);
00332 ExecuteAndRenderVariable( buf10.Num(longNum,EHex), buf10 );
00333
00334
00335
00336 ExecuteAndRenderVariable( buf10.Num(longNum*16,EHex), buf10 );
00337
00338 TRealFormat realFormatter(8);
00339 ExecuteAndRenderVariable( buf10.Num(3.5,realFormatter), buf10 );
00340 ExecuteAndRenderVariable( buf10.Num(10.0/3,realFormatter), buf10 );
00341 ExecuteAndRenderVariable( buf10.Num(123.0*1000*1000*1000,realFormatter),
00342 buf10 );
00343
00344
00345 _LIT(KFormattingMsg, "\nFormatting data types\n");
00346 output.Append( KFormattingMsg );
00347 TBuf<64> buf;
00348 RenderVariableFormatted( buf, output, KRenderCharacteristics );
00349
00350
00351 _LIT(KBinary, "binary=%b");
00352 ExecuteAndRenderVariableFormatted(
00353 buf.Format( KBinary, 33),
00354 buf,output, KRenderDefault );
00355
00356
00357 _LIT(KDecimal, "decimal=%d");
00358 ExecuteAndRenderVariableFormatted(
00359 buf.Format( KDecimal, 33),
00360 buf,output, KRenderDefault );
00361
00362
00363 _LIT(KHexaDecimal, "hexadecimal=%x");
00364 ExecuteAndRenderVariableFormatted(
00365 buf.Format( KHexaDecimal, 33),
00366 buf,output, KRenderDefault );
00367
00368
00369 _LIT(KRealExp, "real (exp)=%e");
00370 ExecuteAndRenderVariableFormatted(
00371 buf.Format( KRealExp, 33.43),
00372 buf,output, KRenderDefault );
00373
00374
00375 _LIT(KRealFixed, "real (fixed)=%f");
00376 ExecuteAndRenderVariableFormatted(
00377 buf.Format( KRealFixed, 33.43),
00378 buf,output, KRenderDefault );
00379
00380
00381 _LIT(Khellostring, "hello");
00382 _LIT(KString, "str='%S'");
00383 _LIT(KString1, "str='%s'");
00384 TPtrC str = Khellostring();
00385 RenderVariableString( str );
00386 ExecuteAndRenderVariableFormatted(
00387 buf.Format( KString, &str),
00388 buf,output, KRenderDefault );
00389
00390
00391 ExecuteAndRenderVariableFormatted(
00392 buf.Format( KString1, str.Ptr()),
00393 buf,output, KRenderDefault );
00394
00395
00396 _LIT(KalignpadMsg, "\nFormatting align and padding\n");
00397 output.Append( KalignpadMsg );
00398
00399
00400 _LIT(KString2, "binary=%10b");
00401 ExecuteAndRenderVariableFormatted(
00402 buf.Format( KString2, 33),
00403 buf,output, KRenderDefault );
00404
00405
00406 _LIT(KString3, "binary=%010b");
00407 ExecuteAndRenderVariableFormatted(
00408 buf.Format( KString3, 33),
00409 buf,output, KRenderDefault );
00410
00411
00412 _LIT(KString4, "binary=%08d");
00413 ExecuteAndRenderVariableFormatted(
00414 buf.Format( KString4, 12345),
00415 buf,output, KRenderDefault );
00416
00417 RenderVariableString( str );
00418 _LIT(KString5, "str='%20S'");
00419
00420 ExecuteAndRenderVariableFormatted(
00421 buf.Format( KString5, &str),
00422 buf,output, KRenderDefault );
00423
00424
00425 _LIT(KString6, "str='%020S'");
00426 ExecuteAndRenderVariableFormatted(
00427 buf.Format( KString6, &str),
00428 buf,output, KRenderDefault );
00429
00430
00431 _LIT(KString7, "str='%=20S'");
00432 ExecuteAndRenderVariableFormatted(
00433 buf.Format( KString7, &str),
00434 buf,output, KRenderDefault );
00435
00436
00437 _LIT(KSTring8, "str='%-20S'");
00438 ExecuteAndRenderVariableFormatted(
00439 buf.Format( KSTring8, &str),
00440 buf,output, KRenderDefault );
00441
00442
00443 _LIT(KString9, "str='%+20S'");
00444 ExecuteAndRenderVariableFormatted(
00445 buf.Format( KString9, &str),
00446 buf,output, KRenderDefault );
00447
00448
00449 _LIT(KString10, "str='%=*20S'");
00450 ExecuteAndRenderVariableFormatted(
00451 buf.Format( KString10, '.', &str),
00452 buf,output, KRenderDefault );
00453
00454
00455 _LIT(KOtherModificationMsg, "\nOther modifications...\n");
00456 output.Append( KOtherModificationMsg );
00457 _LIT(KStrabcd, "abcd");
00458 buf.Copy(KStrabcd);
00459 RenderVariableString( buf );
00460
00461
00462 _LIT(KString11, "____");
00463 ExecuteAndRenderVariableFormatted(
00464 buf.Insert( 2, KString11 ),
00465 buf, output, KRenderDefault );
00466
00467
00468 _LIT(KString12, "****");
00469 ExecuteAndRenderVariableFormatted(
00470 buf.Replace( 3, 2, KString12 ),
00471 buf, output, KRenderDefault );
00472
00473
00474
00475
00476 _LIT(KStrAA, "AA");
00477 ExecuteAndRenderVariableFormatted(
00478 buf.Replace( 1, 0, KStrAA ),
00479 buf, output, KRenderDefault );
00480
00481
00482
00483 _LIT(KStrblank, "");
00484 ExecuteAndRenderVariableFormatted(
00485 buf.Replace( 2, 9, KStrblank ),
00486 buf, output, KRenderDefault );
00487
00488
00489 _LIT(KStrHello, "Hello!");
00490 buf.Copy( KStrHello);
00491 RenderVariableString(buf);
00492 ExecuteAndRenderVariableFormatted(
00493 buf.Delete( 1, 2 ),
00494 buf, output, KRenderDefault );
00495
00496
00497 _LIT(KTrimMsg, "\nTrimming. The buf in each case is\n");
00498 _LIT(KStrHelloWorld, " Hello World! ");
00499 output.Append( KTrimMsg );
00500 buf.Copy( KStrHelloWorld );
00501 RenderVariableString(buf);
00502
00503
00504 ExecuteAndRenderVariableFormatted(
00505 buf.TrimLeft(),
00506 buf, output, KRenderDefault );
00507
00508
00509 buf.Copy( KStrHelloWorld );
00510 ExecuteAndRenderVariableFormatted(
00511 buf.TrimRight(),
00512 buf, output, KRenderDefault );
00513
00514
00515 buf.Copy( KStrHelloWorld );
00516 ExecuteAndRenderVariableFormatted(
00517 buf.Trim(),
00518 buf, output, KRenderDefault );
00519
00520
00521 buf.Copy( KStrHelloWorld );
00522 ExecuteAndRenderVariableFormatted(
00523 buf.TrimAll(),
00524 buf, output, KRenderDefault );
00525
00526
00527 _LIT(KFillingMsg, "\nFilling...\n");
00528 output.Append( KFillingMsg );
00529 buf.Copy( KStrabcd );
00530 RenderVariableString(buf);
00531
00532 ExecuteAndRenderVariableFormatted(
00533 buf.Fill('*'),
00534 buf, output, KRenderCharacteristics );
00535
00536
00537 ExecuteAndRenderVariableFormatted(
00538 buf.Fill('.', 12),
00539 buf, output, KRenderCharacteristics );
00540
00541
00542 ExecuteAndRenderVariableFormatted(
00543 buf.FillZ(6),
00544 buf, output, KRenderCharacteristics | KRenderContentAsBinary);
00545
00546
00547 _LIT(KHey, "Hey!");
00548 ExecuteAndRenderVariableFormatted(
00549 buf.Copy( KHey ),
00550 buf, output, KRenderDefault);
00551
00552 ExecuteAndRenderVariableFormatted(
00553 buf.FillZ(),
00554 buf, output, KRenderCharacteristics | KRenderContentAsBinary);
00555
00556
00557 _LIT(KTxtConvertMsg, "\nText conversions...\n");
00558 _LIT(KHelloWorld, "Hello World");
00559 output.Append( KTxtConvertMsg );
00560 buf.Copy( KHelloWorld );
00561 RenderVariableString(buf);
00562 ExecuteAndRenderVariableFormatted(
00563 buf.LowerCase(),
00564 buf, output, KRenderDefault);
00565
00566 ExecuteAndRenderVariableFormatted(
00567 buf.UpperCase(),
00568 buf, output, KRenderDefault);
00569
00570 ExecuteAndRenderVariableFormatted(
00571 buf.Capitalize(),
00572 buf, output, KRenderDefault);
00573
00574
00575 _LIT(KSwapMsg, "\nSwapping...\n");
00576 output.Append( KSwapMsg );
00577 _LIT(Kbuf1, "buf1!");
00578 _LIT(Kbuf2, "buf2**");
00579 TBuf<20> buf1( Kbuf1 );
00580 TBuf<20> buf2( Kbuf2 );
00581 RenderVariableString( buf1 );
00582 RenderVariableString( buf2 );
00583 _LIT(KSwapResult, "After buf1.Swap(buf2)\n");
00584 output.Append( KSwapResult );
00585 buf1.Swap(buf2);
00586 RenderVariableString( buf1 );
00587 RenderVariableString( buf2 );
00588
00589
00590
00591
00592
00593
00594
00595 iViewer->UpdateView();
00596 }
00602 void CDescriptorExamples::CharacterConversionsL()
00603 {
00604 {
00605
00606 RFs fsSession;
00607 User::LeaveIfError( fsSession.Connect() );
00608 CleanupClosePushL(fsSession);
00609
00610
00611
00612 CCnvCharacterSetConverter *converter;
00613 converter = CCnvCharacterSetConverter::NewLC();
00614 converter->PrepareToConvertToOrFromL(KCharacterSetIdentifierSms7Bit,
00615 fsSession );
00616
00617
00618
00619 const TUint8 SMSSourceBytes[] =
00620 {
00621 54,
00622 2,
00623 27, 61,
00624 53,
00625 27, 101,
00626 };
00627 TPtrC8 SMSEncodedStr(SMSSourceBytes,sizeof(SMSSourceBytes));
00628
00629
00630 TInt state = CCnvCharacterSetConverter::KStateDefault;
00631 TBuf<64> UCS2Buf;
00632 converter->ConvertToUnicode(UCS2Buf, SMSEncodedStr, state);
00633
00634
00635 CleanupStack::PopAndDestroy(2);
00636 }
00637
00638 TPtr output( iViewer->GetViewBuffer() );
00639 CArrayFix<CCnvCharacterSetConverter::SCharacterSet>* sets;
00640 RFs fsSession;
00641 CCnvCharacterSetConverter *converter;
00642
00643
00644
00645
00646 _LIT(KConvertersList, "CharacterConversions: List converters");
00647 RenderHeader( KConvertersList, output );
00648
00649
00650
00651 User::LeaveIfError(fsSession.Connect());
00652 CleanupClosePushL(fsSession);
00653
00654 sets = CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL(fsSession);
00655 CleanupStack::PushL(sets);
00656
00657 _LIT(KList, "\nList of available character converters:\n");
00658 output.Append( KList );
00659 _LIT(KName, " %S\n");
00660 for( int i=sets->Count()-1; i>=0; i-- )
00661 {
00662 TPtrC name = sets->At(i).Name();
00663 output.AppendFormat( KName, &name );
00664 }
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706 const TUint8 SMSSourceBytes[] =
00707 {
00708 54,2,27,61,53,27,101
00709 };
00710
00711
00712
00713 converter = CCnvCharacterSetConverter::NewLC();
00714 converter->PrepareToConvertToOrFromL( KCharacterSetIdentifierSms7Bit,
00715 fsSession );
00716
00717
00718
00719 TInt state = CCnvCharacterSetConverter::KStateDefault;
00720 TBuf16<10> unicodeConverted;
00721 TPtrC8 SMSSource( SMSSourceBytes, sizeof( SMSSourceBytes ) );
00722
00723
00724
00725 converter->ConvertToUnicode( unicodeConverted, SMSSource, state );
00726
00727
00728 _LIT(KMsg1, "CharacterConversions: SMS to Unicode");
00729 RenderHeader( KMsg1, output );
00730 _LIT(KMsg2, "SMS data consist of 7 bit character values (where euro and tilde char consist of two numbers):\n");
00731 output.Append( KMsg2 );
00732 RenderVariableBinary( SMSSource );
00733 _LIT(KMsg3, "\nWhile unicode uses 16 bits to store each character:\n");
00734 output.Append( KMsg3 );
00735 RenderVariableBinary( unicodeConverted );
00736 RenderVariableString( unicodeConverted );
00737
00738
00739
00740 _LIT(KMsg4, "CharacterConversions: Unicode to SMS");
00741 RenderHeader( KMsg4, output );
00742
00743
00744 _LIT(KUnicodeSrc, "Some nice chars: \x00F6,\x00E4,\x004F,\x00C4 \x20AC");
00745 TBuf<64> unicodeSource( KUnicodeSrc );
00746
00747
00748
00749
00750
00751
00752 RenderVariableString( unicodeSource );
00753
00754 RenderVariableBinary( unicodeSource );
00755
00756
00757 TBuf8<128> convertedToSMS;
00758 converter->ConvertFromUnicode( convertedToSMS, unicodeSource );
00759 RenderVariableBinary( convertedToSMS );
00760 RenderVariableString( convertedToSMS );
00761
00762 _LIT(KMsg5, "\nEuro character is espaced in SMS encoding so number of 'chars' differ:\n");
00763 output.Append( KMsg5 );
00764 RenderResult( unicodeSource.Length() );
00765 RenderResult( convertedToSMS.Length() );
00766
00767 _LIT(KMsg6, "\nUnicode consist of 16 bit chars while SMS consist of 8 bit ones. Number of bytes in encodings:\n");
00768 output.Append( KMsg6 );
00769 RenderResult( unicodeSource.Size() );
00770 RenderResult( convertedToSMS.Size() );
00771
00772 iViewer->UpdateView();
00773 CleanupStack::PopAndDestroy(3);
00774 }
00780 void CDescriptorExamples::LexicalAnalysis()
00781 {
00782 TPtr output( iViewer->GetViewBuffer() );
00783 _LIT(KLexicalAnalysis, "LexicalAnalysis");
00784 RenderHeader( KLexicalAnalysis, output );
00785
00786
00787
00788
00789 TLex lex;
00790
00791 _LIT(KNum1, "-254 is number");
00792 TInt num1;
00793 lex.Assign( KNum1 );
00794 RenderVariableString(lex.Remainder());
00795
00796 ExecuteAndRenderVariableFormatted(
00797 lex.Val(num1),
00798 num1, output, KRenderDefault );
00799
00800 _LIT(KNum2, "2ff is hex number");
00801 TUint32 num2;
00802 lex.Assign( KNum2 );
00803
00804 RenderVariableString(lex.Remainder());
00805
00806 ExecuteAndRenderVariableFormatted(
00807 lex.Val(num2, EHex),
00808 num2, output, KRenderDefault );
00809
00810
00811 _LIT(KNum3, "234.678 is real number");
00812 TReal32 num3;
00813 lex.Assign( KNum3 );
00814 RenderVariableString(lex.Remainder());
00815
00816 lex.Val(num3, '.');
00817 _LIT(KNum3Value, "lex.Val(num3, '.') -> num3=");
00818 output.Append( KNum3Value );
00819 TRealFormat realFormat;
00820 output.AppendNum( num3, realFormat );
00821
00822 iViewer->UpdateView();
00823 }