Operator . (Member Access)
Returns a reference to a member from a reference to an object
Syntax
`
Declare Operator . ( ByRef lhs As T ) As U
`
Note that `Operator .` (Member access) returns a reference. As of 02.27.07, FreeBASIC syntax does not support returning references. When it does, this syntax will need to be changed.
Usage
`
result = lhs . rhs
`
Parameters
`lhs`
An object.
`T`
A user-defined type.
`rhs`
The name of a member to access.
`U`
The type that `rhs` refers to.
Return Value
Returns a reference to the member specified by `rhs`.
Description
`Operator .` (Member access) returns a reference to a member of an object.
`Operator .` (Member access) can also be used to access members of an implicit object inside a `With..End With` block.
Example
`
Type T
As Integer a, b
End Type
Dim x As T
'' Access the member 'a' of x.
x.a = 10
'' Access the member 'b' of x.
With x
.b = 20
End With
`
Dialect Differences

- In the -lang qb dialect, this operator cannot be overloaded.

Differences from QB

- None

See also

- `Operator -> (Pointer To Member Access)`
- `Operator @ (Address Of)`
- `Operator * (Value Of)`
- `With..End With`