| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Date: | Fri, 04 Jun 2004 20:18:02 +0200 |
| Date: | Fri, 4 Jun 2004 20:18:01 +0200 |
| From: | Laszlo Ersek <LACOS AT ludens DOT elte DOT hu> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Thousands' grouping flag in printf() format string |
| Message-ID: | <Pine.VMS.3.91-2.1040604200929.50295D-100000@ludens.elte.hu> |
| MIME-Version: | 1.0 |
| X-ELTE-SpamVersion: | MailScanner 4.26.8-itk2 (ELTE 1.1) SpamAssassin 2.63 ClamAV 0.65 |
| X-ELTE-VirusStatus: | clean |
| X-ELTE-SpamCheck: | no |
| X-ELTE-SpamCheck-Details: | score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 |
| X-ELTE-SpamLevel: | |
| X-ELTE-SpamScore: | -4 |
| Note-from-DJ: | This may be spam |
I'd like to ask whether there is any intention to implement the X/Open
extension ' (0x27) printf() format flag. (Numbered argument specifications
work (thanks to Jeff Johnston), and they are an X/Open extension too.)
I encountered this problem using cygwin-1.5.10-3 on an XP.
Illustration:
--------
#define _XOPEN_SOURCE
#include <stdio.h>
#include <assert.h>
#include <locale.h>
int main(void)
{
assert(setlocale(LC_NUMERIC, ""));
/* This works. */
printf("%1$d %1$d\n", 1000);
/* This does not, even if LC_NUMERIC is C. */
printf("%'d\n", 1001);
return 0;
}
--------
Thank you
Laszlo Ersek
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |