abakobo 7 年之前
父节点
当前提交
38939b110a
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 2 2
      modules/mojo/input/keycodes.monkey2
  2. 3 3
      modules/monkey/newdocs/language/pointers.md

+ 2 - 2
modules/mojo/input/keycodes.monkey2

@@ -3,8 +3,8 @@ Namespace mojo.input
 
 
 #rem monkeydoc Key codes.
 #rem monkeydoc Key codes.
 
 
-By default, key codes refer to 'virtual' keys. For example, `Key.W` refers to the key with 'W' printed on it. However, this key may be not
-be in the same physical location on all users' keyboards, due to OS language and keyboard settings.
+By default, key codes refer to 'virtual' keys. For example, `Key.W` refers to the key with 'W' printed on it. However, this key may not be
+in the same physical location on all users' keyboards, due to OS language and keyboard settings.
 
 
 To deal with this, mojo also provides support for 'raw' keys. A raw key code is simply a virtual key code 'or'ed with the special key code
 To deal with this, mojo also provides support for 'raw' keys. A raw key code is simply a virtual key code 'or'ed with the special key code
 `Key.Raw`.
 `Key.Raw`.

+ 3 - 3
modules/monkey/newdocs/language/pointers.md

@@ -45,11 +45,11 @@ myPtr=VarPtr i
 Print myPtr[0]
 Print myPtr[0]
 ```
 ```
 Will print 1, the value of `i`.
 Will print 1, the value of `i`.
-Note you can use pointer arythmetics with the index operator(`[]`) but you have to be sure you have access to that part of the memory or you'll get a memory access violation!
+Note you can use pointer arithmetics with the index operator(`[]`) but you have to be sure you have access to that part of the memory or you'll get a memory access violation!
 
 
 @#### Dereferencing with ->
 @#### Dereferencing with ->
 
 
-You can access a struct fields, methods,.. with the `->` operator. It is equivalent to `[0].`. Note that pointer to class is prohibited.
+You can access a struct's fields, methods,.. with the `->` operator. It is equivalent to `[0].`. Note that creating a pointer to class is prohibited.
 
 
 ```
 ```
 Struct str
 Struct str
@@ -83,4 +83,4 @@ Local foo2:myFooClass
 
 
 foo2=Cast<myFooClass>(myVoidPtr)
 foo2=Cast<myFooClass>(myVoidPtr)
 ```
 ```
-"foo" and "foo2" will have the same address(reference). Note that casting to `Void Ptr` is essentially used when dealing with external native code.
+"foo" and "foo2" will have the same address(reference). Note that casting to `Void Ptr` is commonly used when dealing with external native code.