From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78125 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:15:38 +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> <20120904210525.725f8b90@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1408696910==" X-Trace: ger.gmane.org 1346786155 8697 80.91.229.3 (4 Sep 2012 19:15:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2012 19:15:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 04 21:15:53 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 1T8ybE-0008Pu-7G for gctc-ntg-context-518@m.gmane.org; Tue, 04 Sep 2012 21:15:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EFA0D101EB; Tue, 4 Sep 2012 21:15:44 +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 UgAAtvqwYk+d; Tue, 4 Sep 2012 21:15:43 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D0888101F2; Tue, 4 Sep 2012 21:15:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B0AC2101F2 for ; Tue, 4 Sep 2012 21:15:40 +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 6FvbtsIpOube for ; Tue, 4 Sep 2012 21:15:39 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id D3178101EB for ; Tue, 4 Sep 2012 21:15:39 +0200 (CEST) Original-Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q84JFc9k019494 for ; Tue, 4 Sep 2012 21:15:39 +0200 Original-Received: by weys10 with SMTP id s10so4722355wey.14 for ; Tue, 04 Sep 2012 12:15:38 -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=0rPNGCkV1W4nxTyyZ/OVbrG4GWqGv2VzsVAdubYQUQA=; b=f6ClUD+yh6wljaJOi031KU0vEIrqcO+9nY+JrShdo+VNKaO1ADnmrolnw3MDfWnkLA 9XyuTaWmSlBKk0vF9MbLwnU426hjUTt7YrCQv56Ulk1vcx6m8PiG7lHloWSxF9Y15a+n wnpIvD9T6VGttkuuRBmoK9+SmW4PSCi21tp841HY1SIBVSNvKCqZOHyiGLhuFsr+UJYT cFnXsl8AYufnq+C/IZBFJGb8Ex1nNtFuzHlWteGREWT8YPyTupDzSOz+3AsARo930zMW LLaVf0UkeqafCN4c7U7mxz2DhuCDZOtBpKp0VTuzpNFV04cP780PrMapI8FkPysEbXzq EpMQ== Original-Received: by 10.180.87.34 with SMTP id u2mr32658152wiz.3.1346786138626; Tue, 04 Sep 2012 12:15:38 -0700 (PDT) Original-Received: by 10.223.75.155 with HTTP; Tue, 4 Sep 2012 12:15:38 -0700 (PDT) In-Reply-To: <20120904210525.725f8b90@homerow> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.169; 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: 0THT7fCaq - 0b2ed34f281c - 20120904 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:78125 Archived-At: --===============1408696910== Content-Type: multipart/alternative; boundary=f46d044280f6619a4404c8e51588 --f46d044280f6619a4404c8e51588 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Sep 4, 2012 at 9:05 PM, Marco Patzer wrote: > On 2012-09-04 Herbert Voss wrote: > > Hi Herbert, > > > > \starttext > > > \startluacode > > > if true then; > > > context("true") > > > else; > > > context("false") > > > end > > > \stopluacode > > > \stoptext > > > > that is no Lua syntax > > if true then; > print("true") > else; > print("false") > end > > This snippet fed into a standalone Lua interpreter prints =E2=80=9Ctrue= =E2=80=9D on > the terminal. > > Not in my lua interpreter: saving the snippet into test.lua $>lua test.lua gives lua: test.lua:1: unexpected symbol near ';' --=20 luigi --f46d044280f6619a4404c8e51588 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Tue, Sep 4, 2012 at 9:05 PM, Marco Pa= tzer <homerow@lavabit.com> wrote:
On 2012-09-04 Herbert Voss <Herbert.Voss@FU-Berlin.DE> wrote:

Hi Herbert,

> > \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

if true then;
=C2=A0 print("true")
else;
=C2=A0 print("false")
end

This snippet fed into a standalone Lua interpreter prints =E2=80=9Ctrue=E2= =80=9D on
the terminal.

Not in my lua interpreter: saving the snippet into te= st.lua=C2=A0
$>lua test.lua
gives
lua: tes= t.lua:1: unexpected symbol near ';'


--
luigi

--f46d044280f6619a4404c8e51588-- --===============1408696910== 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 ___________________________________________________________________________________ --===============1408696910==--