Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Resource initialisation punctuation

A semicolon must follow all 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.

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

The rules to remember are as follows:

Type of entity

Punctuation needed after closing }

resource

nothing

array member (not last one)

,

last array member

nothing

struct member

;