Next: , Previous: , Up: The Poke Language   [Contents][Index]


18.7 Assignments

The assignment statement has the form:

lvalue = exp;

where lvalue is either:

In all cases, the type of exp should match the type of the referred entity.

Examples:

(poke) foo = 10
(poke) packet.length = 4
(poke) packet.data = [1,2,3,4]
(poke) packet.data[2] = 666
(poke) int @ 23#B = 23
(poke) string @ str.offset = "foo"
(poke) int[2] @ 23#B = [1,2]
(poke) Packet @ 0#B = Packet { … }