(put: …VariableToValue) → Instant
A left-to-right version of (set:) that requires the word
into rather than
Almost every programming language has a (set:) construct, and most of these place the
variable on the left-hand-side. However, a minority, such as HyperTalk, place the variable
on the right. Harlowe allows both to be used, depending on personal preference. (set:) reads
), and (put:) reads as
Just as with (set:), a variable is changed using
). You can
also set multiple variables in a single (put:) by separating each VariableToValue
(put: 2 into $batteries, 4 into $bottles), etc.
it can also be used with (put:), but, interestingly, it's used on the right-hand side of
(put: $eggs + 2 into it).