[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: expression to the left of `:'?
- From: "Nick Trout" <nick@...>
- Date: Tue, 11 Apr 2000 11:07:23 +0100
> But now, if the previous statement was "i=a", we would have
>
> i=a
> (m1*m2):print()
>
> and the interpreter would read this as "i=a(m1*m2):print()" (as it
> actually does). I do not know any "elegant" solution to this problem.
Am I right in thinking you can put an optional ';' after a statement?
>From the manual...
4.5.1 - Blocks
A block is a list of statements, which are executed sequentially. A statement
may be optionally followed by a semicolon:
block ::= {stat sc} [ret]
sc ::= [';']
So you could do:
i=a ;
(m1*m2):print()