2
0
Эх сурвалжийг харах

index types cleanup, enum corrections, add octal

abakobo 8 жил өмнө
parent
commit
e50a997d4d

+ 3 - 2
modules/monkey/docs/index/keywords-index.md

@@ -3,8 +3,9 @@
 #### Abstract
 
 Used while declaring classes: class cannot be instantiated with `New`, it must be extended.
-
-/linkto User-defined-types \linkto
+<br>
+<a href="javascript:void('monkey:user-types#classes')" onclick="openDocsPage('monkey:user-types#classes')">See Classes.</a>
+&nbsp;
 
 #### Alias
 

+ 2 - 2
modules/monkey/docs/index/types-index.md

@@ -1,4 +1,4 @@
-@manpage Primitive Types
+@manpage Types Index
 
 ####Void
 No type.
@@ -29,7 +29,7 @@ String of 16 bit characters.
 ####Array
 Array type.
 ####Enum
-32bit UInt Enumerated type.
+32 bit signed integer enumerated type.
 ####Object
 Object type.
 ####Ptr

+ 7 - 10
modules/monkey/docs/language/enums.md

@@ -1,6 +1,6 @@
 ### Enums
 
-`Enum` is a data type containing a set of UInt constants.
+`Enum` is a data type containing a set of Int constants.
 
 By default the members will receive values starting from zero and incemented by one for each new member. You can assign a chosen value to each member when declaring them.
 
@@ -45,15 +45,12 @@ Enum Foo '(modifiers on 5th and 6th bit)
 End
 ```
 
-Some operations examples:
+For now enums don't accept negative number litterals. To assign a negative number you'll have to type a substraction until the bug is resolved.
 ```
-Local flags1:=Flags.A | Flags.B
-Local flags2:=flags1 | Flags.C
-Local flags3:=Flags.B & (flags1 ~ flags3.D)
+Enum Foo '(with a negative member)
+	Negative=0-1 'instead of -1
+	None=0
+	A=1,B,C,D,E,F,G,H,J,K,L,M
+End
 ```
 
-If needed, you can 'extract' the variable value by simply assigning your `Enum` variable to a `UInt`.
-
-```
-Local i:UInt=flags1
-```

+ 7 - 0
modules/monkey/docs/language/misc.md

@@ -22,6 +22,13 @@ Hexadecimal numbers can be entered using the $ symbol
 Local i:=$A0F
 ```
 
+#### 0 Octal
+
+Octal numbers can be entered using the 0 symbol
+```
+Local i:=010 'is decimal 9
+```
+
 #### Inline Code comments
 
 Inline comments can be done with the `'` character.

BIN
modules/monkey/docs/printableDocs.docx