zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk
Subject: Re: core dumps with (( #\... ))
Date: Thu, 23 Sep 1999 15:48:58 +0200	[thread overview]
Message-ID: <9909231348.AA20988@ibmth.df.unipi.it> (raw)
In-Reply-To: "Sven Wischnowsky"'s message of "Thu, 23 Sep 1999 15:04:26 DFT." <199909231304.PAA24601@beta.informatik.hu-berlin.de>

Sven Wischnowsky wrote:
> > Should I change it but keep \ for backward compatibility?
> 
> That would be kind.

This is not hard.

--- Doc/Zsh/arith.yo.mchar	Tue Sep 21 11:25:32 1999
+++ Doc/Zsh/arith.yo	Thu Sep 23 15:43:36 1999
@@ -86,13 +86,14 @@
 arithmetic expressions. The shell currently defines no mathematical
 functions, but modules may define some.
 
-An expression of the form `tt(#\)var(x)' where var(x) is any character
+An expression of the form `tt(##)var(x)' where var(x) is any character
 sequence such as `tt(a)', `tt(^A)', or `tt(\M-\C-x)' gives the ascii
 value of this character and an expression of the form `tt(#)var(foo)'
 gives the ascii value of the first character of the value of the
 parameter var(foo).  Note that this is different from the expression
 `tt($#)var(foo)', a standard parameter substitution which gives the
-length of the parameter var(foo).
+length of the parameter var(foo).  `tt(#\)' is accepted instead of
+`tt(##)', but its use is deprecated.
 
 Named parameters and subscripted arrays can be referenced by name within an
 arithmetic expression without using the parameter expansion syntax.  For
--- Src/math.c.mchar	Thu Sep 23 15:42:18 1999
+++ Src/math.c	Thu Sep 23 15:42:20 1999
@@ -374,7 +374,7 @@
 		return NUM;
 	    }
 	    if (*ptr == '#') {
-		if (*++ptr == '\\') {
+		if (*++ptr == '\\' || *ptr == '#') {
 		    int v;
 
 		    ptr++;

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


  reply	other threads:[~1999-09-23 14:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-23 13:04 Sven Wischnowsky
1999-09-23 13:48 ` Peter Stephenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-09-23 11:18 Adam Spiers
1999-09-23 12:10 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9909231348.AA20988@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).