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: 103376,67fd28f4008484be X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: unconstrained subtype in component declaration, tagged OO Date: Sat, 26 Mar 2011 15:50:17 -0700 Organization: Aioe.org NNTP Server Message-ID: References: <1v6bdfssnx5jd$.1k5a6782kgvu5.dlg@40tude.net> Reply-To: nma@12000.org NNTP-Posting-Host: tUYQ4Ty9mMw9Pdc8TJRFQA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news2.google.com comp.lang.ada:19459 Date: 2011-03-26T15:50:17-07:00 List-Id: On 3/26/2011 1:42 PM, Dmitry A. Kazakov wrote: >> -------------------foo.ads------- >> package foo is >> type foo_t is tagged private; > > type foo_t (<>) is tagged private; > Thanks Dmitry, that is one I did not find, the use of (<>) there. It is now all working well. I also like that I can write o.method() now in Ada and do not have to write method(o) as before. I am converting some of my Matlab functions and scripts for solving PDE's to Ada to see how it works out. So far, it is working very well. I really like the Ada array predefined operators, very useful. Also I like that I can define my array to start from 0 or other index values and not only from 1. Some numerical schemes I use are more natural when using starting anindex other than from 1. Only problem is plotting the solution. So far, I write the data from one simulation run to one text file and then use Matlab to load and plot the data at the end of the simulation. Works well, but data size can get very large, and when I load it to Matlab, it requires lots of RAM. This is because I have to save the data for each time step to be able to create all the plots. In Matlab, I do not need to save all the data, since I can plot each frame as I go, and then throw the current data away, and hence only need the data (solution) for the current time step. I might figure a way to improve this, as may be using one text file to save the output for each time step. But then I will get huge number of files created on my disk each time I run the program. Sometimes I run it for 2000 or 3000 time steps, each time step can generate 1000 data points. If Only Ada had plotting in it, it will be just perfect :) --Nasser