Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Sep 2009 03:23:35 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n831NZD5005248 for ; Thu, 3 Sep 2009 03:23:36 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n831I4r0010449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Sep 2009 03:18:05 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n82M1WiR027151; Thu, 3 Sep 2009 03:17:55 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 301027 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 3 Sep 2009 03:17:55 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n831Ht26007370 for ; Thu, 3 Sep 2009 03:17:55 +0200 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n831Hob4030909 for ; Thu, 3 Sep 2009 03:17:54 +0200 Received: by fg-out-1718.google.com with SMTP id e21so1217127fga.16 for ; Wed, 02 Sep 2009 18:17:50 -0700 (PDT) Received: by 10.86.13.37 with SMTP id 37mr3238668fgm.58.1251940670826; Wed, 02 Sep 2009 18:17:50 -0700 (PDT) Received: from ?10.0.1.103? (219-90-148-218.ip.adam.com.au [219.90.148.218]) by mx.google.com with ESMTPS id 12sm768703fgg.18.2009.09.02.18.17.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 02 Sep 2009 18:17:49 -0700 (PDT) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v935.3) References: <4A9EC6ED.2080901@morningstar2.co.uk> X-Mailer: Apple Mail (2.935.3) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id n831Ht26007371 Message-ID: Date: Thu, 3 Sep 2009 10:47:42 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: xparse processors To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4A9EC6ED.2080901@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 03 Sep 2009 01:23:36.0007 (UTC) FILETIME=[28A1ED70:01CA2C35] Status: R X-Status: X-Keywords: X-UID: 6080 On 03/09/2009, at 4:56 AM, Joseph Wright wrote: > One question occurs to me about xparse "processors". I've provided one > that splits on a comma, \xparse_process_comma_split:n. I wonder what > the > behaviour of this type of function should be if the input is not of > the > correct form. At the moment, if you apply a processor to an optional > argument and no value is given, the special \NoValue token is left > alone. The normal behaviour for this function is: > > \xparse_process_comma_split:n { 1,2 } => {1} {2} > > but what should happen with > > \xparse_process_comma_split:n { 12 } > > A the moment you get "{12} \NoValue" so that exactly two results are > returned. Should you get perhaps just \NoValue, or something else? What if I wanted to use more than two 'coordinates'? \xparse_process_comma_split:n { 1,2,3 } => {1}{2}{3} In which case: \xparse_process_comma_split:n { 12 } => {12} In general terms, I think it should be the responsibility of the underlying function that is reading the output {12} to pad the braces if necessary and call an error if wrong input is given. On the other hand, if the function were given a more specific name then {12}\NoValue would also be an acceptable output. Just my 2¢ Will