<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Properties</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>Recent changes to Properties</description><atom:link href="https://sourceforge.net/p/asil/wiki/Properties/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 16 Feb 2014 10:36:18 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/asil/wiki/Properties/feed" rel="self" type="application/rss+xml"/><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v11
+++ v12
@@ -11,6 +11,7 @@
 A simple property:

 ~~~~
+:::text
 public property String MyProperty
   get
     return "a"
@@ -22,6 +23,7 @@
 Note: Unlike functions, a property can be called either the **[get](keywords-get)** or the **[set](keywords-set)** accessor, but not both in a single call.  In the code below, ASIL would call the **[set](keywords-set)** accessor , but not the **[get](keywords-get)** accessor.  Instead, ASIL would pass the string constant to whatever &lt;code&gt;S$&lt;/code&gt; turned out to be.

 ~~~~~
+:::text
 S$ = MyProperty = "5sdf"
 ~~~~~

@@ -30,6 +32,7 @@
 A property can be **[virtual](keywords-virtual)** and shown below.  If you're overriding such a property, you need to use the **[override](keywords-override)** keyword.

 ~~~~
+:::text
 public virtual property IntProperty%
   get
     return 3
@@ -43,6 +46,7 @@
 The **[get](keywords-get)** and **[set](keywords-set)** accessors can have different access qualifiers.  You can also make one **[final](keywords-final)** and one **[virtual](keywords-virtual)** if needed.  Whatever is given for the property applies for the accessors unless they override it.

 ~~~~
+:::text
 public property NewProp#
   virtual get
     return null
@@ -56,6 +60,7 @@
 Unlike C#, ASIL properties can be indexed and take parameters.  These parameters are calleed "index parameters".  Your property must take the same index parameters for both the **get** and **set** accessors.  If you need different versions, consider overloading.  If the type you're returning has the self property, your property takes precedence.  Custom keywords are allowed.  The brackets are required.  Those in the declaration below don't mark an optional sequence, but are how you specify the property is indexed.

 ~~~~
+:::text
 public property boolean IsReady[var int index]
   get
     return i[index]
@@ -67,6 +72,7 @@
 You call an indexed property like this:

 ~~~~
+:::text
 if IsReady[4] then
   IsReady[3] = true
 ~~~~
@@ -76,6 +82,7 @@
 You can have a property on the **[self](keywords-self)** keyword.  This is called a default property.  It is always indexed.

 ~~~~
+:::text
 public property byte self[var String strName]
   get
     return map.lookupName strName
@@ -84,6 +91,7 @@
 This is how you call it:

 ~~~~
+:::text
 instance["name"]
 ~~~~

@@ -96,6 +104,7 @@
 Examine the code below.

 ~~~~
+:::text
 class MyClass
   public property int self[var int index]
     get
@@ -110,6 +119,7 @@
 Now look at this code:

 ~~~~
+:::text
 var OtherClass myOtherClass = new OtherClass ' Presumably we declared constructors for both classes

 var int i% = myOtherClass.Prop[7] ' Error as OtherClass.Prop returns a MyClass
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Sun, 16 Feb 2014 10:36:18 -0000</pubDate><guid>https://sourceforge.neta7de03e8bd6405909dce908d5743c4b61c9c3ad7</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -2,11 +2,11 @@

 What properties are and aren't
 ------------------------------
-While properties may look like commands and functions, they aren't.  A property shouldn't be used unless directly backed by a member.  So if a string property call &lt;code&gt;MyStringProperty&lt;/code&gt; is present, you should have a string member called &lt;code&gt;MyString&lt;/code&gt; in the same scope.
+While properties may look like commands and functions, they aren't.  A property shouldn't be used unless directly backed by a member.  So if a string property call &lt;code&gt;MyStringProperty&lt;/code&gt; is present, you should have a string member called &lt;code&gt;MyString&lt;/code&gt; in the same scope.  The exception is properties that have only a  **[get](keywords-get)** accessor.  They might be used to compute something.  However, all **[get](keywords-get)** accessors are implicitly constant as though they were declared with the **[const](keywords-const)** keyword.

 Simple properties
 -----------------
-Properties in ASIL are most similar to those in C#, but are more flexible.  Think of the [**get**] clause as a function and the [**set**] clause as a command.  Each clause is a type of procedure called an "accessor".
+Properties in ASIL are most similar to those in C#, but are more flexible.  Think of the **[get](keywords-get)** clause as a function and the **[set](keywords-set)** clause as a command.  Each clause is a type of procedure called an "accessor".

 A simple property:

@@ -19,7 +19,7 @@
     someMember = value
 ~~~~

-Note: Unlike functions, a property can be called either the [**get**] or the [**set**] accessor, but not both in a single call.  In the code below, ASIL would call the [**set**] accessor , but not the [**get**] accessor.  Instead, ASIL would pass the string constant to whatever &lt;code&gt;S$&lt;/code&gt; turned out to be.
+Note: Unlike functions, a property can be called either the **[get](keywords-get)** or the **[set](keywords-set)** accessor, but not both in a single call.  In the code below, ASIL would call the **[set](keywords-set)** accessor , but not the **[get](keywords-get)** accessor.  Instead, ASIL would pass the string constant to whatever &lt;code&gt;S$&lt;/code&gt; turned out to be.

 ~~~~~
 S$ = MyProperty = "5sdf"
@@ -27,7 +27,7 @@

 Virtual properties
 ------------------
-A property can be [**virtual**] and shown below.  If you're overriding such a property, you need to use the [**override**] keyword.
+A property can be **[virtual](keywords-virtual)** and shown below.  If you're overriding such a property, you need to use the **[override](keywords-override)** keyword.

 ~~~~
 public virtual property IntProperty%
@@ -40,7 +40,7 @@

 Differing qualifiers
 --------------------
-The [**get**] and [**set**] accessors can have different access qualifiers.  You can also make one [**final**] and one [**virtual**] if needed.  Whatever is given for the property applies for the accessors unless they override it.
+The **[get](keywords-get)** and **[set](keywords-set)** accessors can have different access qualifiers.  You can also make one **[final](keywords-final)** and one **[virtual](keywords-virtual)** if needed.  Whatever is given for the property applies for the accessors unless they override it.

 ~~~~
 public property NewProp#
@@ -73,7 +73,7 @@

 Self properties
 ---------------
-You can have a property on the [**self**] keyword.  This is called a default property.  It is always indexed.
+You can have a property on the **[self](keywords-self)** keyword.  This is called a default property.  It is always indexed.

 ~~~~
 public property byte self[var String strName]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Thu, 13 Feb 2014 22:30:23 -0000</pubDate><guid>https://sourceforge.net13181be9392fd5bbf1e638174c351db37fe85ba1</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -115,3 +115,7 @@
 var int i% = myOtherClass.Prop[7] ' Error as OtherClass.Prop returns a MyClass
 var int j% = myOtherClass.Prop[7][4] ' Valid as the "[4]" portion is the default property
 ~~~~
+
+Overloaded properties
+---------------------
+ASIL allows properties to be overloaded.  However, all the overloads must be of the same type.  You will need at least one to be indexed, unless the property is the default property, in which case all the overloads will be indexed.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 12:03:17 -0000</pubDate><guid>https://sourceforge.net14913ef54d66082f148cfba82e9c6f9dcd68f736</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -113,5 +113,5 @@
 var OtherClass myOtherClass = new OtherClass ' Presumably we declared constructors for both classes

 var int i% = myOtherClass.Prop[7] ' Error as OtherClass.Prop returns a MyClass
-var int j% = myOtherClass.Prop[7][4] ' Valid as the "[4] part is the default property
+var int j% = myOtherClass.Prop[7][4] ' Valid as the "[4]" portion is the default property
 ~~~~
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 11:55:26 -0000</pubDate><guid>https://sourceforge.net5ea9c89cb4f8ab83213525354cfb61711587f22e</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -27,8 +27,7 @@

 Virtual properties
 ------------------
-
-A virtual property:
+A property can be [**virtual**] and shown below.  If you're overriding such a property, you need to use the [**override**] keyword.

 ~~~~
 public virtual property IntProperty%
@@ -41,7 +40,6 @@

 Differing qualifiers
 --------------------
-
 The [**get**] and [**set**] accessors can have different access qualifiers.  You can also make one [**final**] and one [**virtual**] if needed.  Whatever is given for the property applies for the accessors unless they override it.

 ~~~~
@@ -91,5 +89,29 @@

 Delegates and properties
 ------------------------
+See [Delegates] on how to create delegates for properties.

-See [Delegates] on how to create delegates for properties.
+Watch out for the combination of indexed and default properties
+---------------------------------------------------------------
+Examine the code below.
+
+~~~~
+class MyClass
+  public property int self[var int index]
+    get
+      ' return some value
+
+class OtherClass
+  public property MyClass Prop[var int index]
+    get
+       ' return some value
+~~~~
+
+Now look at this code:
+
+~~~~
+var OtherClass myOtherClass = new OtherClass ' Presumably we declared constructors for both classes
+
+var int i% = myOtherClass.Prop[7] ' Error as OtherClass.Prop returns a MyClass
+var int j% = myOtherClass.Prop[7][4] ' Valid as the "[4] part is the default property
+~~~~
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 11:53:50 -0000</pubDate><guid>https://sourceforge.netf92b62f5ee2b955748c4d2c2d64549f89b426fa0</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -55,7 +55,7 @@

 Indexed properties
 ------------------
-Unlike C#, ASIL properties can be indexed and take parameters.  These parameters are calleed "index parameters".  Your property must take the same index parameters for both the **get** and **set** accessors.  If you need different versions, consider overloading.  If the type you're returning has the self property, your property takes precedence.  Custom keywords are allowed.
+Unlike C#, ASIL properties can be indexed and take parameters.  These parameters are calleed "index parameters".  Your property must take the same index parameters for both the **get** and **set** accessors.  If you need different versions, consider overloading.  If the type you're returning has the self property, your property takes precedence.  Custom keywords are allowed.  The brackets are required.  Those in the declaration below don't mark an optional sequence, but are how you specify the property is indexed.

 ~~~~
 public property boolean IsReady[var int index]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 11:42:58 -0000</pubDate><guid>https://sourceforge.neta525d249fe35464bfe0093f70af59218a56a7311</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1,8 +1,11 @@
 [TOC]
+
+What properties are and aren't
+------------------------------
+While properties may look like commands and functions, they aren't.  A property shouldn't be used unless directly backed by a member.  So if a string property call &lt;code&gt;MyStringProperty&lt;/code&gt; is present, you should have a string member called &lt;code&gt;MyString&lt;/code&gt; in the same scope.

 Simple properties
 -----------------
-
 Properties in ASIL are most similar to those in C#, but are more flexible.  Think of the [**get**] clause as a function and the [**set**] clause as a command.  Each clause is a type of procedure called an "accessor".

 A simple property:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 08:39:37 -0000</pubDate><guid>https://sourceforge.net8a712d9f5b045d1eb7e0bff24907ffc278833adf</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -16,10 +16,10 @@
     someMember = value
 ~~~~

-Note: Unlike functions, a property can be called either the [**get**] or the [**set**] accessor, but not both in a single call.  So the following is illegal:
+Note: Unlike functions, a property can be called either the [**get**] or the [**set**] accessor, but not both in a single call.  In the code below, ASIL would call the [**set**] accessor , but not the [**get**] accessor.  Instead, ASIL would pass the string constant to whatever &lt;code&gt;S$&lt;/code&gt; turned out to be.

 ~~~~~
-S$ = MyProperty = "5sdf" ' Illegal
+S$ = MyProperty = "5sdf"
 ~~~~~

 Virtual properties
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 08:32:32 -0000</pubDate><guid>https://sourceforge.netf2d277b51c2727027c8a7dea02dd521809ff882f</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -3,7 +3,7 @@
 Simple properties
 -----------------

-Properties in ASIL are most similar to those in C#, but are more flexible.  Think of the [**get**] clause as a function and the [**set**] clause as a command.
+Properties in ASIL are most similar to those in C#, but are more flexible.  Think of the [**get**] clause as a function and the [**set**] clause as a command.  Each clause is a type of procedure called an "accessor".

 A simple property:

@@ -15,6 +15,12 @@
   set
     someMember = value
 ~~~~
+
+Note: Unlike functions, a property can be called either the [**get**] or the [**set**] accessor, but not both in a single call.  So the following is illegal:
+
+~~~~~
+S$ = MyProperty = "5sdf" ' Illegal
+~~~~~

 Virtual properties
 ------------------
@@ -57,6 +63,13 @@
     i[index] = value
 ~~~~

+You call an indexed property like this:
+
+~~~~
+if IsReady[4] then
+  IsReady[3] = true
+~~~~
+
 Self properties
 ---------------
 You can have a property on the [**self**] keyword.  This is called a default property.  It is always indexed.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 08:26:24 -0000</pubDate><guid>https://sourceforge.net85a1bb3ab091e7766ff97c30f72d89d9f49069ed</guid></item><item><title>Properties modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Properties/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -3,7 +3,7 @@
 Simple properties
 -----------------

-Properties in ASIL are most similar to those in C#, but are more flexible.  Think of the **get** clause as a function and the **set** clause as a command.
+Properties in ASIL are most similar to those in C#, but are more flexible.  Think of the [**get**] clause as a function and the [**set**] clause as a command.

 A simple property:

@@ -33,7 +33,7 @@
 Differing qualifiers
 --------------------

-The **get** and **set** accessors can have different access qualifiers.  You can also make one final and one virtual if needed.  Whatever is given for the property applies for the accessors unless they override it.
+The [**get**] and [**set**] accessors can have different access qualifiers.  You can also make one [**final**] and one [**virtual**] if needed.  Whatever is given for the property applies for the accessors unless they override it.

 ~~~~
 public property NewProp#
@@ -46,7 +46,7 @@

 Indexed properties
 ------------------
-Unlike C#, ASIL properties can be indexed and take parameters.  Your property must take the sample properties for both the **get** and **set** accessors.  If you need different versions, consider overloading.  If the type you're returning has the self property, your property takes precedence.  Custom keywords are allowed.
+Unlike C#, ASIL properties can be indexed and take parameters.  These parameters are calleed "index parameters".  Your property must take the same index parameters for both the **get** and **set** accessors.  If you need different versions, consider overloading.  If the type you're returning has the self property, your property takes precedence.  Custom keywords are allowed.

 ~~~~
 public property boolean IsReady[var int index]
@@ -59,7 +59,7 @@

 Self properties
 ---------------
-You can have a property on the self keyword.  This is called a default property.  It is always indexed.
+You can have a property on the [**self**] keyword.  This is called a default property.  It is always indexed.

 ~~~~
 public property byte self[var String strName]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Sat, 08 Feb 2014 13:03:05 -0000</pubDate><guid>https://sourceforge.net5cbb7e757d049ebab975a8bedd18cd01fd982e32</guid></item></channel></rss>