Symbian3/SDK/Source/GUID-B6088C0A-20AE-5108-A28C-9CA884205493.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept xml:lang="en" id="GUID-B6088C0A-20AE-5108-A28C-9CA884205493"><title>Resource initialisation punctuation</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A semicolon must follow <i>all</i> member initialisations. For longer, more complicated resources deciding where semicolons must be placed may become confusing. As shown in the following example, array lists are separated by commas and terminated without a semi-colon. Similarly, resources are not terminated by a semi-colon.</p> <codeblock id="GUID-3A6DD81D-7C2A-5B41-9AE1-4B31F9F3BAA1" xml:space="preserve">RESOURCE DIALOG example_dialog
       
    13     {
       
    14     title="Example";
       
    15     topsection=DLAY_SECTION
       
    16         {
       
    17         control_list=
       
    18             {
       
    19             ACLIST
       
    20                 {
       
    21                 butlist_flags=BUTLIST_HORIZONTAL;
       
    22                 rid=R_HCIL_BUTTONS_OK_CANCEL;
       
    23                 },    // array member so comma needed
       
    24             ACLIST
       
    25                 {
       
    26                 butlist_flags=BUTLIST_HORIZONTAL;
       
    27                 rid=R_HCIL_BUTTONS_OK_CANCEL;
       
    28                 } // last item in array so nothing needed
       
    29             }; // end of struct member control_list so ‘;’ needed
       
    30         };  // end of struct member topsection so ‘;’ needed
       
    31     }   // end of resource so nothing needed</codeblock> <p>The rules to remember are as follows:</p> <table id="GUID-D3314534-0BD3-568A-96A2-9B822CEA4B47"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><tbody><row><entry><p><b>Type of entity</b> </p> </entry> <entry><p><b>Punctuation needed after closing }</b> </p> </entry> </row> <row><entry><p>resource</p> </entry> <entry><p>nothing</p> </entry> </row> <row><entry><p>array member (not last one)</p> </entry> <entry><p>,</p> </entry> </row> <row><entry><p>last array member</p> </entry> <entry><p>nothing</p> </entry> </row> <row><entry><p>struct member</p> </entry> <entry><p>;</p> </entry> </row> </tbody> </tgroup> </table> </conbody></concept>