Parcourir la source

Merge branch 'develop' of https://github.com/blitz-research/monkey2 into develop

Mark Sibly il y a 6 ans
Parent
commit
2bad985661
1 fichiers modifiés avec 18 ajouts et 1 suppressions
  1. 18 1
      modules/monkey/newdocs/language/user-types.md

+ 18 - 1
modules/monkey/newdocs/language/user-types.md

@@ -66,10 +66,27 @@ To declare an interface:
 
 
 _Interfaces_ is a comma separated list of interface types.
 _Interfaces_ is a comma separated list of interface types.
 
 
-An interface can contain consts, globals, fields, methods, functions and other user defined types.
+An interface can contain consts, globals, methods, functions, properties and other user defined types.
 
 
 Interface methods are always 'abstract' and cannot declare any code.
 Interface methods are always 'abstract' and cannot declare any code.
 
 
+Example for using properties in an interface:
+```
+Interface IExample
+
+	' Property with Setter
+	Property IntProp1( a:Int )
+
+	' Property with Getter
+	Property IntProp2:Int()
+
+	' Property with Setter + Getter
+	Property IntProp3:Int()
+	Setter( a:Int )
+
+End
+```
+
 
 
 @#### Fields
 @#### Fields