ref: 32695d586d8af9becd6bdcb0448d204e382a1f02
parent: 8e97c355d09f2bb8fe71956369272ce513cef0d1
author: Ori Bernstein <[email protected]>
date: Tue Sep 16 14:51:23 EDT 2014
Fix documentation for pointers. We changed from '#' to '*' for pointers long ago. This updates the language docs to match that.
--- a/doc/lang.txt
+++ b/doc/lang.txt
@@ -372,6 +372,7 @@
x.name Member lookup
x++ Postincrement
x-- Postdecrement
+ x# Dereference
x[e] Index
x[from,to] Slice
@@ -378,7 +379,6 @@
Precedence 12:
++x Preincrement
--x Predecrement
- *x Dereference
&x Address
!x Logical negation
~x Bitwise negation
@@ -498,9 +498,9 @@
slice array
Pointers are, as expected, values that hold the address of
- the pointed to value. They are declared by appending a '*'
+ the pointed to value. They are declared by appending a '#'
to the type. Pointer arithmetic is not allowed. They are
- declared by appending a '*' to the base type
+ declared by appending a '#' to the base type
Arrays are a group of N values, where N is part of the type.
Arrays of different sizes are incompatible. Arrays in
@@ -512,7 +512,7 @@
contents. They are declared by appending a '[,]' to the base
type.
- foo* type: pointer to foo
+ foo# type: pointer to foo
foo[123] type: array of 123 foo
foo[,] type: slice of foo