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

Take care,

Robert Boyer <[EMAIL PROTECTED]> 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                                            [EMAIL PROTECTED]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah


_______________________________________________
Gcl-devel mailing list
Gcl-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/gcl-devel

Reply via email to