focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / arrow
1 SYMBOL and NAME
2     ->  - arrow operator
3
4 SYNOPSIS
5     p -> X
6
7 TYPES
8     p           pointer to an lvalue
9     X           identifier
10
11     return      lvalue
12
13 DESCRIPTION
14     p->X returns the same as (*p).X.  Thus the current value of *p is
15     to be an object of a type for which X identifies one element.
16     p->X then returns the lvalue corresponding to that element of the
17     value of *p.
18
19     The expression *p.X will cause a runtime error since this is
20     interpreted as *(p.X) in which p is expected to be an object of
21     an appropriate type.
22
23     Spaces or tabs on either side of -> are optional.
24
25 EXAMPLES
26     > obj pair {one, two}
27     > obj pair A, B
28     > p = &A
29     > p->one = 1; p->two = 2
30     > A
31             obj pair {1, 2}
32
33     > A->two = &B
34     > p->two->one = 3; p->two->two = 4
35
36     > *p->ptwo
37             obj pair {3, 4}
38
39     > B = {5,6}
40     > *p->two
41             obj pair {5, 6}
42
43
44 LIMITS
45     none
46
47 LINK LIBRARY
48     none
49
50 SEE ALSO
51     address, dereference, isptr, dot
52