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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!b7g2000yqk.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Mon, 10 May 2010 13:56:11 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4be417b4$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1qcb6z4i20dyb.1dz2hd4c0vx69.dlg@40tude.net> NNTP-Posting-Host: 62.203.201.79 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1273524971 6418 127.0.0.1 (10 May 2010 20:56:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 10 May 2010 20:56:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b7g2000yqk.googlegroups.com; posting-host=62.203.201.79; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:11471 Date: 2010-05-10T13:56:11-07:00 List-Id: On 10 Maj, 19:55, "Dmitry A. Kazakov" wrote: > >> C's I/O is a disaster, > > > You have only listed an opinion when you don't > > list specifics. > > Did you used it? Character input returns integer, Interestingly, same as in Java. I believe that they should have done it with a separate flag instead of inflating the state space by using bigger type. > file is a number, The C programming language does not define files as numbers. > sometimes a pointer, In C files are designated by pointers *always*, not sometimes. > do you use =A0fseek or lseek? Again confusion - lseek is not part of C. > Is errno thread safe in > UNIX? (What does C say about threads?) C says nothing about threads. But that's OK, because you do not ask about C in isolation, but about its interaction with Unix. That is, the thread-safety of errno in Unix is defined by appropriate Unix standards: http://www.unix.org/whitepapers/reentrant.html (see "Redefinition of errno") > We constantly > fight with catching: > > =A0 =A0printf ("%s", X); > > X is an object of the type having implicit conversion to const * for outp= ut > purpose. Then wait until your programmers start learning C++ and begin to delete such objects... :-) Coming back to I/O - what I miss in Ada is the equivalent of fread in C - that is, an operation that reads *up to* the given number of bytes. Or maybe there is something that I didn't notice? Such an operation is an important basis for custom buffered input. Without it the only way to reinvent a proper I/O is via direct bindings to system- level API. -- Maciej Sobczak * http://www.inspirel.com YAMI4 - Messaging Solution for Distributed Systems http://www.inspirel.com/yami4