Skip to content

Commit

Permalink
Merge pull request #18 from Neyaz/pointerof
Browse files Browse the repository at this point in the history
translate _gitbook/syntax_and_semantics/pointerof.md
  • Loading branch information
forsaken1 authored Oct 4, 2016
2 parents 53fd6a9 + 1b3e6fd commit 32f91cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _gitbook/syntax_and_semantics/pointerof.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pointerof

The `pointerof` expression returns a [Pointer](http://crystal-lang.org/api/Pointer.html) that points to the contents of a variable or instance variable.
Выражение `pointerof` возвращает [Указатель](http://crystal-lang.org/api/Pointer.html), который указывает на содержимое переменной или экземпляр переменной.

An example with a variable:
Пример с переменной:

```crystal
a = 1
Expand All @@ -13,7 +13,7 @@ ptr.value = 2
a #=> 2
```

An example with an instance variable:
Пример с экземпляром переменной:

```crystal
class Point
Expand All @@ -37,5 +37,5 @@ ptr.value = 10
point.x #=> 10
```

Because `pointerof` involves pointers, it is considered [unsafe](unsafe.html).
Так как `pointerof` содержит указатели, то он считается [небезопасным](unsafe.html).

0 comments on commit 32f91cb

Please sign in to comment.