From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78127 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Lua conditionals fail inside \starttexdefinition Date: Tue, 4 Sep 2012 21:22:37 +0200 Message-ID: References: <20120904142109.32f088b2@homerow> <827CE8D8-8E41-4267-B70C-FCACF6A0C2FC@gmail.com> <5AB862EA-153B-4485-A376-8618568826C7@gmail.com> <20120904204419.595d2f3b@homerow> <50464EDF.6020300@FU-Berlin.DE> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0806004059==" X-Trace: ger.gmane.org 1346786565 12369 80.91.229.3 (4 Sep 2012 19:22:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2012 19:22:45 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 04 21:22:47 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8yhy-00058h-K2 for gctc-ntg-context-518@m.gmane.org; Tue, 04 Sep 2012 21:22:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7187A101EB; Tue, 4 Sep 2012 21:22:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id X4NsVEqCt15G; Tue, 4 Sep 2012 21:22:41 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 57DE6101F8; Tue, 4 Sep 2012 21:22:41 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CC44E101F8 for ; Tue, 4 Sep 2012 21:22:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id t5EqWGUZQb57 for ; Tue, 4 Sep 2012 21:22:38 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id A3710101EB for ; Tue, 4 Sep 2012 21:22:38 +0200 (CEST) Original-Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q84JMbcK000881 for ; Tue, 4 Sep 2012 21:22:37 +0200 Original-Received: by wgbdq12 with SMTP id dq12so4587133wgb.2 for ; Tue, 04 Sep 2012 12:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fbLyXa7tv0ZLHIqOMUcUrin6WkNXL0G4xxW7sNw9MG8=; b=JDpMYraxYBTipYzS1XcnDL9Qre4bYuUHeJKef+fS2qfXbSztDxe2u5DyvYcECBl3Wa zbBG53apppN93NPFH64QCGBhBNAytf55gbomuyP68RF2xjCulG+jvvNKXc8e3hzcBEHP CTC4crUcafNMkdF0X6QU3FR1baa4GrcG1q/RJbFzuUu5U7UxW+RcnwKhpbwiolpoofhl dtOd+Qj0UuxBS9DOcfPPAIg3dCvWOmeS62NbDx47FrBWIywo7mQqchB63XkdXPZ3KXpN JD1Y9Awo11BBINj7iiWMt9CjSMcsk6BvmUmGpu9mkhQphVMLXOrK8+jWcZyrIZE7e7gm gy/Q== Original-Received: by 10.216.208.69 with SMTP id p47mr11061528weo.150.1346786557226; Tue, 04 Sep 2012 12:22:37 -0700 (PDT) Original-Received: by 10.223.75.155 with HTTP; Tue, 4 Sep 2012 12:22:37 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07HT7mBNM - d40c4b154043 - 20120904 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78127 Archived-At: --===============0806004059== Content-Type: multipart/alternative; boundary=001636c5b8fa54ef1304c8e52e42 --001636c5b8fa54ef1304c8e52e42 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 4, 2012 at 9:05 PM, Aditya Mahajan wrote: > On Tue, 4 Sep 2012, Herbert Voss wrote: > > Am 04.09.2012 20:44, schrieb Marco Patzer: >> >>> On 2012-09-04 Wolfgang Schuster 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 > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : 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 --001636c5b8fa54ef1304c8e52e42 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Tue, Sep 4, 2012 at 9:05 PM, Aditya M= ahajan <adityam@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.schuster@gmail.com> wrote:

Why does adding semicolon not work?

Do you have a example?


\starttext
\startluacode
=C2=A0 =C2=A0if true then;
=C2=A0 =C2=A0 =C2=A0context("true")
=C2=A0 =C2=A0else;
=C2=A0 =C2=A0 =C2=A0context("false")
=C2=A0 =C2=A0end
\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 t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =C2=A0:
http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive =C2=A0: http://foundry.supelec.fr/projects/contextrev/=
wiki =C2=A0 =C2=A0 : http://contextgarden.net
_____________________________________________________________= ______________________


"""
The unit of exec= ution 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 mean= ing and familiar syntax:

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

=
--
luigi

--001636c5b8fa54ef1304c8e52e42-- --===============0806004059== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0806004059==--