From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,971aa11c293c3db1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-04 19:22:44 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc2.on.home.com.POSTED!not-for-mail Message-ID: <3B6CADF7.BE292242@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada The Best Language? References: <3B59CD72@MailAndNews.com> <9j749o$lmp$7@news.tpi.pl> <9j9n9v$djt$1@news.tpi.pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 05 Aug 2001 02:22:43 GMT NNTP-Posting-Host: 24.141.193.224 X-Complaints-To: abuse@home.net X-Trace: news1.rdc2.on.home.com 996978163 24.141.193.224 (Sat, 04 Aug 2001 19:22:43 PDT) NNTP-Posting-Date: Sat, 04 Aug 2001 19:22:43 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:11299 Date: 2001-08-05T02:22:43+00:00 List-Id: David Thompson wrote: > David C. Hoos wrote : > > ----- Original Message ----- > > From: "Tomasz Wegrzanowski" > > Newsgroups: comp.lang.ada > > To: > > Sent: Friday, July 20, 2001 11:46 AM > > Subject: Re: Ada The Best Language? > ... > > The other thing about prontf that is different from Ada is the fact that it > > (as well as many other C functions) takes a variable number of arguments. > > > Many? The only varargs functions in the standard C library > are the *printf and *scanf families. POSIX/Unix adds open > (really only optional not variable), fcntl, syslog, and execl*. > This is out of some thousand or so total, although I expect > printf in particular is among the most frequently used. > Occurrence in user (and third-party) code is of course up to > the programmer(s), but IME is not that common; YMMV. Also don't forget the X Window calls.. a few of those use variable # of args as well. > The bad part is not that number (and types) of arguments is variable -- > Ada, and C++, accomplish that safely but within limits with overloads, > templates/generics and defaults -- it is that C-varargs usually aren't > checked for correct type(s) and number, and in conventional > compile+link systems, can't be; I can imagine something like > IBM VisualAge could check, but I have no idea if it does. > > -- > - David.Thompson 1 now at worldnet.att.net GCC does check if you enable it, but only for static format strings. It cannot check obviously, for "string variable" formats. -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg