From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57599 Path: news.gmane.org!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: arguments to ctxlua Date: Tue, 30 Mar 2010 19:45:47 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269971168 19247 80.91.229.12 (30 Mar 2010 17:46:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 17:46:08 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 30 19:46:04 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NwfVs-0006qv-Gw for gctc-ntg-context-518@m.gmane.org; Tue, 30 Mar 2010 19:46:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 34DC3C9DA2; Tue, 30 Mar 2010 19:46:04 +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 89rBdi1hgP4v; Tue, 30 Mar 2010 19:45:52 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 68D20C9DA1; Tue, 30 Mar 2010 19:45:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EAA6EC9DA1 for ; Tue, 30 Mar 2010 19:45:50 +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 dRz0wWAQVh6J for ; Tue, 30 Mar 2010 19:45:48 +0200 (CEST) Original-Received: from smtp-vbr7.xs4all.nl (smtp-vbr7.xs4all.nl [194.109.24.27]) by balder.ntg.nl (Postfix) with ESMTP id 75D4FC9D9F for ; Tue, 30 Mar 2010 19:45:48 +0200 (CEST) Original-Received: from [192.168.178.23] (a82-95-102-36.adsl.xs4all.nl [82.95.102.36]) (authenticated bits=0) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id o2UHjmo9057973 for ; Tue, 30 Mar 2010 19:45:48 +0200 (CEST) (envelope-from H.vanderMeer@uva.nl) X-Mailer: Apple Mail (2.936) X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:57599 Archived-At: When I have a Lua function with 2 arguments: \startluacode function f(a,b) ... \stopluacode called through: \def\callf#1#2{\ctxlua{f("#1","#2")}} and do this actually with one argument: \callf{one} then I find that the absent argument b in f(a,b) is not nil but a string of length 1. That is a bit of a nuisance because I would like to use the Lua idiom: function f(a,b) local b = b or default but that is frustrated by the behaviour shown. Is this an artifact of either luatex or ConTeXt? Can it be avoided such that in this case b will be nil? Hans van der Meer ___________________________________________________________________________________ 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 ___________________________________________________________________________________