From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29907 invoked from network); 3 Jun 2006 05:51:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.2 (2006-05-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.2 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Jun 2006 05:51:57 -0000 Received: (qmail 91967 invoked from network); 3 Jun 2006 05:51:50 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Jun 2006 05:51:50 -0000 Received: (qmail 29838 invoked by alias); 3 Jun 2006 05:51:42 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10350 Received: (qmail 29829 invoked from network); 3 Jun 2006 05:51:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Jun 2006 05:51:41 -0000 Received: (qmail 90924 invoked from network); 3 Jun 2006 05:51:41 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 3 Jun 2006 05:51:39 -0000 Received: from torch.brasslantern.com ([71.116.105.50]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J0900G3ISA0FHC3@vms046.mailsrvcs.net> for zsh-users@sunsite.dk; Sat, 03 Jun 2006 00:51:37 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k535paFU020994 for ; Fri, 02 Jun 2006 22:51:36 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k535pZX7020993 for zsh-users@sunsite.dk; Fri, 02 Jun 2006 22:51:35 -0700 Date: Fri, 02 Jun 2006 22:51:35 -0700 From: Bart Schaefer Subject: Re: Are there "binary" variables? In-reply-to: To: ZSH Users Message-id: <060602225135.ZM20992@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: Comments: In reply to "Johann 'Myrkraverk' Oskarsson" "Are there "binary" variables?" (Jun 3, 12:21am) On Jun 3, 12:21am, Johann 'Myrkraverk' Oskarsson wrote: } } specifically, is there a way to compare ^E to 5 and get true? In the manual under "Arithmetic Evaluation", a few pages down: An expression of the form `##X' where X is any character sequence such as `a', `^A', or `\M-\C-x' gives the ASCII value of this character and an expression of the form `#FOO' gives the ASCII value of the first character of the value of the parameter FOO. zsh% print $((##\C-e)) 5 zsh% ((##\C-e == 5)) && print It is 5 || print It is not 5 It is 5 zsh% In the manual under "Quoting": A string enclosed between "$'" and "'" is processed the same way as the string arguments of the print builtin, and the resulting string is considered to be entirely quoted. zsh% print $'\5' | cat -v ^E zsh% ctrlE=$'\5' zsh% print $((#ctrlE)) 5 zsh%