diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-97C0A5B1-99AE-5F71-9092-A6976E54AEA7.dita --- a/Symbian3/SDK/Source/GUID-97C0A5B1-99AE-5F71-9092-A6976E54AEA7.dita Fri Jul 16 17:23:46 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ - - - - - -How -to initialise STRUCT RESOURCE members -

<struct-initialiser> -

-

struct-initialiser ::= -

-

<struct-name> { <struct-initialiser-item-list> } <struct-initialiser-item> -

-

struct-initialiser-item ::= -

-

<member-name> = <initialiser> ;

-

To initialise a member of STRUCT type, give the struct-name with -which you wish to initialise it, and then specify each member of that struct -which you wish to initialise.

-

The member-names listed must be members of the struct-name struct. -Each initialise must be of a type compatible with the member -it is initialising.

-

Example

-

Given the previously defined struct types,

-STRUCT STRINGCOUNT - { - BUF message; - WORD num; - } -STRUCT SAMPLE - { - WORD anynumber; - STRUCT text; // should be a STRINGCOUNT - } -

the following example shows how to define the struct within a resource:

-RESOURCE SAMPLE show_how - { - anynumber=10; - text=STRINGCOUNT - { - message="Hello" - num=5; - }; - } -

Type safety

-

The compiler does not enforce type safety. Any struct can be used to initialise -a member declared to be of struct type. Usually, however, the designer of -the struct will have intended only one or a limited number of structs ever -be used to initialise a member. You should ensure that you initialise struct -members with the intended struct type.

-
\ No newline at end of file