Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!pilchuck!dataio!fnx!nazgul!bright From: bright@nazgul.UUCP (Walter Bright) Newsgroups: comp.lang.misc Subject: Re: Printing plural forms. Message-ID: <273@nazgul.UUCP> Date: 27 Feb 91 18:02:05 GMT References: <1991Feb19.104810.549@ZYX.SE> Reply-To: bright@nazgul.UUCP (Walter Bright) Organization: Zortech, Seattle Lines: 12 In article <1991Feb19.104810.549@ZYX.SE> arndt@zyx.ZYX.SE (Arndt Jonasson) writes: /We all have seen and, in various degrees, been irritated by texts such as: / 1 files were copied /when it should have been: / 1 file was copied /I'd like to know: when programming, how do you avoid such errors? Are I've never discovered any magic way, other than brute force: printf((n == 1) ? "%d file was copied\n" : "%d files were copied\n",n); or: printf("%d file%s copied\n",n,(n == 1) ? " was" : "s were");