Skip to content

Commit

Permalink
translate _gitbook/syntax_and_semantics/pointerof.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Neyaz committed Oct 2, 2016
1 parent 3b040cb commit 1b3e6fd
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 1b3e6fd

Please sign in to comment.