BUT is used to sequence two expressions.
exp1 BUT exp2 evaluates exp1, and then evaluates and returns the value of exp2.
This may not seem very useful at first sight, but if the first expression is an assignment it allows for a more general assignment expression.
For example, the following code fragments are equivalent:
fred((x:=12*3) BUT x+y) x:=12*3 fred(x+y)
Notice that parentheses need to be used around the assignment expression (in the first fragment) for the reasons given earlier (see 10.3 Assignments).
Go to the Next or Previous section, the Detailed Contents, or the Amiga E Encyclopedia.