Article View: comp.std.c
Article #6155Re: ANSI draft interpretation questions
From: Chris Torek
Date: Sun, 07 Jan 1990 00:18
Date: Sun, 07 Jan 1990 00:18
47 lines
2068 bytes
2068 bytes
In article <11879@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: >The paragraph around line 40 on page 136 of the December draft makes it >clear that the result of the conversion for the n specifier is subject >to assignment suppression by *. (Yes, there IS a conversion, just no >input operation.) Well, I would argue that it makes it the most reasonable interpretation, but definitely *not* `clear'. Anyway, here are the (apparent) answers: %*n suppresses assignment; no action occurs: it is a no-op. (%n is a conversion, but is not an assignment; yet it can be suppressed with assignment suppression.) %[efg] reads a floating point number. If the input has one of the forms <opt-sign><nondigit> <opt-sign>.<nondigit> no input is consumed. If the input has one of the forms <opt-sign><digit-seq><exp><opt-sign><nondigit> <opt-sign><digit-seq>.<exp><opt-sign><nondigit> <opt-sign><digit-seq>.<digit-seq><exp><opt-sign><nondigit> <opt-sign>.<digit-seq><exp><opt-sign><nondigit> the <exp>, the second <opt-sign>, and the <nondigit> remain unconsumed. The definitions of <opt-sign>, <digit-seq>, <exp>, and <nondigit> are the obvious. (Note that EOF counts as a nondigit.) %[dioux] reads an integer. If the input has one of the forms <sign><nondigit> no input is consumed. If the input has the form <opt-sign>0x <opt-sign>0X and the conversion is either `i' or `x', the sign (if any) and the zero are consumed; the `x' or `X' remains unconsumed. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris
Technical Details
Message-ID:
<21675@mimsy.umd.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chrisReferences:
<21623@mimsy.umd.edu> <11879@smoke.BRL.MIL>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.std.c Subject: Re: ANSI draft interpretation questions Message-ID: <21675@mimsy.umd.edu> Date: 7 Jan 90 00:18:18 GMT References: <21623@mimsy.umd.edu> <11879@smoke.BRL.MIL> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 47