On Tue, Sep 4, 2012 at 9:05 PM, Aditya Mahajan <adit...@umich.edu> wrote:

> On Tue, 4 Sep 2012, Herbert Voss wrote:
>
>  Am 04.09.2012 20:44, schrieb Marco Patzer:
>>
>>> On 2012-09-04 Wolfgang Schuster <wolfgang.schus...@gmail.com> wrote:
>>>
>>>  Why does adding semicolon not work?
>>>>>
>>>>
>>>> Do you have a example?
>>>>
>>>
>>>
>>> \starttext
>>> \startluacode
>>>    if true then;
>>>      context("true")
>>>    else;
>>>      context("false")
>>>    end
>>> \stopluacode
>>> \stoptext
>>>
>>
>> that is no Lua syntax
>>
>
> I thought that semicolons were optional in lua are equal to end of lines.
>
> Aditya
>
> ______________________________**______________________________**
> _______________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/**
> listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : 
> http://foundry.supelec.fr/**projects/contextrev/<http://foundry.supelec.fr/projects/contextrev/>
> wiki     : http://contextgarden.net
> ______________________________**______________________________**
> _______________________
>


http://www.lua.org/manual/5.1/manual.html#2.4.4
"""
The unit of execution of Lua is called a chunk. A chunk is simply a
sequence of statements, which are executed sequentially. Each statement can
be optionally followed by a semicolon:
:
:
2.4.4 - Control Structures

The control structures if, while, and repeat have the usual meaning and
familiar syntax:

stat ::= while exp do block end
stat ::= repeat block until exp
stat ::= if exp then block {elseif exp then block} [else block] end
"""
(as conseguence
if exp then; block else; block end
is not valid
)

-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to