[Top][All Lists]

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

Re: Undocumented usage of printf?

From: Eric Blake
Subject: Re: Undocumented usage of printf?
Date: Thu, 15 Apr 2010 09:43:03 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4

On 04/15/2010 08:21 AM, Clark J. Wang wrote:
> I saw a printf usage from a Linux forum's post:
> # printf "%d\n" "'a"
> 97
> #

POSIX requires this behavior, so you could claim that this serves as

"If the leading character is a single-quote or double-quote, the value
shall be the numeric value in the underlying codeset of the character
following the single-quote or double-quote."

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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