Symbian3/SDK/Source/GUID-B6088C0A-20AE-5108-A28C-9CA884205493.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<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
    {
    title="Example";
    topsection=DLAY_SECTION
        {
        control_list=
            {
            ACLIST
                {
                butlist_flags=BUTLIST_HORIZONTAL;
                rid=R_HCIL_BUTTONS_OK_CANCEL;
                },    // array member so comma needed
            ACLIST
                {
                butlist_flags=BUTLIST_HORIZONTAL;
                rid=R_HCIL_BUTTONS_OK_CANCEL;
                } // last item in array so nothing needed
            }; // end of struct member control_list so ‘;’ needed
        };  // end of struct member topsection so ‘;’ needed
    }   // 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>