Browse Source

Merge pull request #280 from mx2DocsCommunity/wipdocs

very small docs work
Mark Sibly 7 years ago
parent
commit
c6c5c5f4c6

+ 4 - 0
modules/monkey/newdocs/index/operators-index.md

@@ -3,6 +3,8 @@
 
 
 ####.
 ####.
 Postfix member acccess
 Postfix member acccess
+####?.
+Postfix safe member acccess
 ####( )
 ####( )
 Postfix Invoke
 Postfix Invoke
 ####[ ]
 ####[ ]
@@ -51,6 +53,8 @@ Equal
 Not equal
 Not equal
 ####? Else
 ####? Else
 If-then-else
 If-then-else
+####?Else
+Elvis operator
 ####And
 ####And
 Boolean and
 Boolean and
 ####Cast
 ####Cast

+ 1 - 1
modules/monkey/newdocs/index/types-index.md

@@ -19,7 +19,7 @@ Boolean type.
 ####Long
 ####Long
 64 bit signed integer.
 64 bit signed integer.
 ####ULong
 ####ULong
-64 bit signed integer.
+64 bit unsigned integer.
 ####Float
 ####Float
 32 bit floating point.
 32 bit floating point.
 ####Double
 ####Double

+ 16 - 0
modules/monkey/newdocs/language/conditional-statements.md

@@ -70,3 +70,19 @@ the _variable_ will receive the value of _Expression-A_ if _Expression_ is True,
 ```
 ```
 i=j>2 ? 5 else j+7
 i=j>2 ? 5 else j+7
 ```
 ```
+
+@#### ?Else
+
+The 'Elvis operator' `?Else` can be used to return an alternate value if an expression is null.
+
+_variable_=_Expression_ `?Else` _Expression-B_
+
+For example:
+
+```
+r=x ?Else -1
+```
+
+This will assign the value of `x` to `r` if `x` is non-null otherwise, it will assign the value -1 to `r`.
+
+

+ 1 - 1
modules/monkey/newdocs/language/loop-statements.md

@@ -101,7 +101,7 @@ If Collection is an array, the loop will iterate through each element of the arr
 
 
 If Collection is a string, the loop will iterate through each character code of the string, and the type of the index variable must be numeric.
 If Collection is a string, the loop will iterate through each character code of the string, and the type of the index variable must be numeric.
 
 
-If Collection is an object, it must implement the std.collections.Icontainer interface. See <a href=http://monkeycoder.co.nz/mx2-docs/std-std-collections-icontainer/ target=blank>std-std-collections-icontainer</a>.
+If Collection is an object, it must implement the [[std:std.collections.IContainer]] interface.
 
 
 @#### Exit
 @#### Exit
 
 

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

@@ -18,7 +18,7 @@ The following primtive types are supported:
 | `Int`		| 32 bit signed integer.
 | `Int`		| 32 bit signed integer.
 | `UInt`	| 32 bit unsigned integer.
 | `UInt`	| 32 bit unsigned integer.
 | `Long`	| 64 bit signed integer.
 | `Long`	| 64 bit signed integer.
-| `ULong`	| 64 bit signed integer.
+| `ULong`	| 64 bit unsigned integer.
 | `Float`	| 32 bit floating point.
 | `Float`	| 32 bit floating point.
 | `Double`	| 64 bit floating point.
 | `Double`	| 64 bit floating point.
 | `String`	| String of 16 bit characters.
 | `String`	| String of 16 bit characters.