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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public From: mike Subject: Re: Ada vs C++ vs Java Date: 1999/02/08 Message-ID: <79nhe1$3n5@drn.newsguy.com>#1/1 X-Deja-AN: 442143822 References: <369C1F31.AE5AF7EF@concentric.net> Organization: Newsguy News Service [http://www.newsguy.com] Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-02-08T00:00:00+00:00 List-Id: In article , eachus@spectre.mitre.org says... > Now a word about the c++ code example that started this discussion. >I've written similar programs in Ada of similar size, mostly to test >sort packages. So why hasn't anyone posted such an example to the >list? > > I'll tell you why I haven't. There are no specified requirements >provided, snip.. > Are there any concurrency requirements? In particular, what are >the requirements, if any, for reading from a pipe or a terminal? > Well. the C++ example was reading from stdin, and it had no tasking? > Is the input format limited such that Ada.Strings.Bounded may be >used for better efficiency? > The C++ example used the string standard class. so it is obvious that it will map to Ada unbounded string? > What are valid characters in the input, and what characters have >special treatment requirements. (In particular for C++ compatibility, >do I have to treat NUL specially?) > > Is the input small enough that I can sort in memory on the >intended target? If not, can I keep the index/tree in memory while >writing the data to disk? >-- But these questions are up to you to figure out. The whole point, is that your Ada program must "behave" the same way as the C++ program. any input I give to the C++ program, should work with Ada, as in a black box thing. Offcourse you must use generic data structures like the C++ program ;) And if you are going to post code that does the same as those 8 lines of C++ did, you need to show all the code used, UNLESS the code is part of the Ada standard library. You say you have your own AVL tree that you can instantiate it to unbounded string, and since this is not part of Ada standard library, then you will have to post the code for that as well :) I am sure when you are done, you'll have more than 8 lines of Ada code ! and thanks in advanced for your code. Mike