Commit 7d39fb89 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

document struct declarations

2007-09-10  Juerg Billeter  <j@bitron.ch>

	* doc/vala/structs.xml: document struct declarations

svn path=/trunk/; revision=600
parent 5a835f4e
2007-09-10 Jürg Billeter <j@bitron.ch>
* doc/vala/structs.xml: document struct declarations
2007-09-09 Jürg Billeter <j@bitron.ch>
* vala/valasymbolresolver.vala: detect interface prerequisite cycle
......
<?xml version="1.0"?>
<section id="structs">
<h>Structs</h>
<p>A struct is a data type that can contain fields, constants, and methods.</p>
<section id="declaration">
<h>Struct declarations</h>
<p>The simplest struct declaration looks like this:</p>
<blockcode>
struct StructName {
&lt;struct-member&gt;
}</blockcode>
<p>You may optionally specify an accessibility modifier. Structs support <code>public</code> and <code>private</code> accessibility and default to private if you don't specify one. Public structs may be accessed from outside the library or application they are defined in.</p>
<blockcode>
public struct StructName {
&lt;struct-member&gt;
}</blockcode>
<p>You may optionally prefix the struct name with a namespace name. This places the struct in the specified namespace without the need for a separate namespace declaration.</p>
<blockcode>
struct NamespaceName.StructName {
&lt;struct-member&gt;
}</blockcode>
</section>
</section>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment