gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: bug in format : colon and atsign order


From: Camm Maguire
Subject: [Gcl-devel] Re: bug in format : colon and atsign order
Date: 09 Aug 2005 01:13:03 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, and thank you so much!  Committed into CVS head (didn't
make it into t4 alas).

Take care,

Robert Boyer <address@hidden> writes:

> Here's a GCL ANSI compliance bug in GCL's FORMAT function that is easy to
> fix.
> 
> As every FORMAT user knows, tilde commands can be optionally given a colon
> and/or atsign modifier, in any order.  "There is no required ordering between
> the at-sign and colon modifier." ANSI doc, p. 22-20.
> 
> Currently GCL requires the colon to come first, before the atsign (if any),
> (or not at all).  For example, in GCL, (format nil "~@:R" 1) causes an error
> but (format nil "~:@R" 1) does not.  In o/format.c you can see where the
> colon and atsign are processed, in order.  So one should replace what comes
> after DIRECTIVE:
> 
> DIRECTIVE:
>       colon = atsign = FALSE;
>       if (c == ':') {
>               colon = TRUE;
>               c = ctl_advance();
>       }
>       if (c == '@') {
>               atsign = TRUE;
>               c = ctl_advance();
>       }
> 
> 
> 
> 
> with the following
> 
> 
> 
> 
> 
> DIRECTIVE:
>       colon = atsign = FALSE;
>       if (c == ':') {
>               colon = TRUE;
>               c = ctl_advance();
>       }
>       if (c == '@') {
>               atsign = TRUE;
>               c = ctl_advance();
>                 if (!colon) {if (c == ':') {colon = TRUE;
>                                           c = ctl_advance();}}
>         }
> 
> Bob
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]