From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68841 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: unusual behaviour of \if(x) Date: Wed, 1 Jun 2011 15:26:12 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1306934792 27845 80.91.229.12 (1 Jun 2011 13:26:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2011 13:26:32 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 01 15:26:29 2011 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 1QRlRI-0006FM-If for gctc-ntg-context-518@m.gmane.org; Wed, 01 Jun 2011 15:26:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B1AF2CAD44; Wed, 1 Jun 2011 15:26:21 +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 BA9IlGnUpv5m; Wed, 1 Jun 2011 15:26:19 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EAE59CAD36; Wed, 1 Jun 2011 15:26:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C4A92CAD36 for ; Wed, 1 Jun 2011 15:26:16 +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 fYdi9MoBtIc1 for ; Wed, 1 Jun 2011 15:26:15 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id E2C8ECAD29 for ; Wed, 1 Jun 2011 15:26:14 +0200 (CEST) Original-Received: from mail-qw0-f41.google.com (mail-qw0-f41.google.com [209.85.216.41]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p51DQDv8008160 for ; Wed, 1 Jun 2011 15:26:14 +0200 Original-Received: by qwa26 with SMTP id 26so3646364qwa.14 for ; Wed, 01 Jun 2011 06:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=vUdLnrJBd9m2/MsqesEvRUJO3lHfhVHOYJ4Nj8ART48=; b=Lpr3MHJtgvM80svx4bobEb8xSfddwO8kNywHyEDcemwg9FawduHL7oSqgbdZnk/Eb+ YbIMOVfDtrqLtVJZKemBmZ6cOavIULP4ViVfeNrapBVOA+9dx+N+33wkgEVYDoVjj+SZ eB7YD1pN2qI2SoTE2T0WmREp95TPNIuyqK61Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=EaSeGhcp66zcLtgUlAZHMWDJWJbtdK5NTixbLX/iMbag+4pYl7BQF3RBvNA1xGw8pu lyJqZ2/M24lQMw1O0GH7L9tyUoCG9pQNTFgPHbOnf6dCT7i4aqwuzX+kvZOv5YuWbj+p MILJkliJUgWDE8VlV/dybvcuEBvUNfC3lS6nM= Original-Received: by 10.224.202.137 with SMTP id fe9mr5247231qab.393.1306934772817; Wed, 01 Jun 2011 06:26:12 -0700 (PDT) Original-Received: by 10.229.220.193 with HTTP; Wed, 1 Jun 2011 06:26:12 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.216.41; 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: 0xEOBqdRn - e2dfce967407 - 20110601 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:68841 Archived-At: Dear magitians, I discovered this in LaTeX, but ConTeXt behaves the same (plain TeX behaves differently). Can somebody please explain me why this code fails to work? (A workaround is to move \newif on top which I'm willing to do, but I'm still curious.) \starttext \ifx\hbox\undefined \message{invisible to tex} \newif\ifabc \abcfalse \ifabc \message{abc true breaks} \else \message{abc false breaks} \fi \fi \stoptext systems : begin file iftest at line 1 abc false breaks ! Extra \fi. l.7 \fi or abc false breaks ! Extra \fi. system > tex > error on line 7 in file iftest.tex: Extra ... 1 \starttext 2 3 \ifx\hbox\undefined 4 \message{invisible to tex} 5 \newif\ifabc \abcfalse 6 \ifabc \message{abc true breaks} \else \message{abc false breaks} \fi 7 >> \fi 8 9 \stoptext 10 l.7 \fi Mojca ___________________________________________________________________________________ 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 ___________________________________________________________________________________