C/C++
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs C/C++

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 4th, 2008, 07:39 PM
viza
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Permutations of a given string

Fri, 04 Jul 2008 12:37:12 -0700, Keith Thompson wrote:
Which actually raises a nearly interesting issue. C99 7.19.2p2 says:
>

A text stream is an ordered sequence of characters composed into
_lines_, each line consisting of zero or more characters plus a
terminating new-line character. Whether the last line requires a
terminating new-line character is implementation-defined.
>

It's not clear from this wording whether an empty stream, consisting of
zero lines, is valid. I have no doubt that it was intended to be the
case; this is merely an issue about the wording in the standard.

Your inference that an empty stream contains zero lines is only valid on
implementations that define a line as requiring a newline character.
Under implementations which define the final newline as optional or
forbidden, the empty (zero-character) stream may contain 1 line.

In any case if you are going to be picky over an entirely academic point,
the standard you quote above says "lines" not "line or lines", so one
could argue that a one-line stream was invalid. Even discussing it would
be a bit sad though

viza

Reply With Quote
Reply

Viewing: Web Development Archives FAQs C/C++ > Permutations of a given string


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT