[Gd-chatter] [Bug 7309] New: Can't use format(%s) on subsequences
bugzilla-daemon at gwydiondylan.org
bugzilla-daemon at gwydiondylan.org
Fri May 5 20:16:55 CEST 2006
http://www.gwydiondylan.org/cgi-bin/bugzilla/show_bug.cgi?id=7309
Summary: Can't use format(%s) on subsequences
Product: common
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS
Status: NEW
Severity: normal
Priority: P2
Component: collection-extensions
AssignedTo: andreas at andreas.org
ReportedBy: lisper at jlieske.com
Though a <string> created via subsequence() works in most situations, it cannot
be passed to format() and printed with %s.
The following code fails:
let string = "Demonstration of Subsequence bug";
format(*standard-output*, "The full string is \"%s\"\n", string);
force-output(*standard-output*);
let sub = subsequence(string, start: 17, end: 28);
format(*standard-output*, "The substring is the third word.\n");
force-output(*standard-output*);
format(*standard-output*, "The next line will use %%= to print the
substring:\n");
force-output(*standard-output*);
format(*standard-output*, "\"%=\"\n", sub);
force-output(*standard-output*);
format(*standard-output*, "The next line will use %%s to print the
substring:\n");
force-output(*standard-output*);
format(*standard-output*, "\"%s\"\n", sub);
force-output(*standard-output*);
The output is
The full string is "Demonstration of Subsequence bug"
The substring is the third word.
The next line will use %= to print the substring:
"{<vs-subsequence>: 'S', 'u', 'b', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e'}"
The next line will use %s to print the substring:
"Application does not hold stream's buffer -- {<fd-stream> instance at
0x42fd60}.
Abort
--
Configure bugmail: http://www.gwydiondylan.org/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the chatter
mailing list