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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,56e5e06428166864 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.158.31.10.MISMATCH!newsfeed-0.progon.net!progon.net!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: problems with interfacing c Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8b6a5b24-5ab0-4d38-9be8-86911aba7fcf@k22g2000yqh.googlegroups.com> <13d5wy5ni51xh$.xnhoi3uhm9ql.dlg@40tude.net> <85c958cc-8cd3-46be-b14d-3519ff207d87@b8g2000vbi.googlegroups.com> <1dfd4mpvmtkt2.aqwiaoz63qli$.dlg@40tude.net> Date: Tue, 1 Feb 2011 09:48:56 +0100 Message-ID: <11kuviuodvji0$.ciczjvknjnc6.dlg@40tude.net> NNTP-Posting-Date: 01 Feb 2011 09:48:56 CET NNTP-Posting-Host: 30be9cbf.newsspool4.arcor-online.net X-Trace: DXC=VB^ZO=1dV41U`5g[@c]@J14IUK7enW;^6ZC`4\`mfM[68DC3RaXCekahS6? X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:17791 Date: 2011-02-01T09:48:56+01:00 List-Id: On Mon, 31 Jan 2011 13:46:10 -0800 (PST), Stoik wrote: > Obviously, reading everything in one chunk is not really needed > for hard problems, but may be substantially quicker for easier ones. I don't think so. Reading from the standard input presumes stream I/O, and keyboard input as a possibility. This means that 1) you never know the actual input length in advance. 2) The behavior on an unexpected input length is undefined: it can block forever, spit an I/O error etc. > because I would like to learn why things do not work as expected. IMO, the problem why things may not work usually lies on the side of C. C is a very complex language, very few people really understand C in full detail. In order to map elements of C onto the corresponding Ada constructs one should first clearly understand what exactly these elements do. The Ada's part is then more or less trivial. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de