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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!seas.gwu.edu!mfeldman From: mfeldman@seas.gwu.edu (Michael Feldman) Newsgroups: comp.lang.ada Subject: Re: File name conventions for Ada units Keywords: Ada, files, conventions, standards Message-ID: <2190@sparko.gwu.edu> Date: 30 Sep 90 02:49:40 GMT References: <589@censun1.UUCP> Reply-To: mfeldman@seas.gwu.edu () Organization: The George Washington University, Washington D.C. List-Id: In article <589@censun1.UUCP> cew@censun1.UUCP (SSUID Craig E Warsaw) writes: > >I've been using the following (the convention used in my first >Ada class): > > package spec: package_.ada > package body: package.ada > subunit: package__subunit.ada > >I've also seen > > package spec: package_spec.ada or package_s.ada > package body: package_body.ada or package_b.ada Well, much of this depends upon the vagaries of the compiler. We have one compiler that accepts _only_ filetype .a (VADS) and another that accepts _only_ filetype .ada (Irvine). It is exceedingly annoying to have to change filenames even on the same operating system (Unix). Meridian suggests (and will accept) .ads for a spec, .ada for a body or main. In fact, their compiler will accept any reasonable filetype as long as it is given explicitly. If you carry the "kind of unit" info in the filetype, then e.g. package specs and bodies can have the same name (this is what Meridian suggests), e.g. package_name.ads and package_name.ada I would go further and use .ads for a spec, .adb for a body, .ada for a main, and maybe .sub or whatever for a subunit. Why there are compilers, in this day and age, that limit file types to some predetermined value, is absolutely beyond me. At most there should be a default which can always be overridden. Are others frustrated with these seemingly unjustifiable compiler limits? Can some compiler folks out there justify the limitations? Maybe I'm missing something here. > >By the way, there is an annoying aspect of all of these schemes. >If I use wildcarding to print or list files, all of the package >bodies occur before the package specs. I'd prefer the specs >before the bodies, but that's not too important. My encoding above would not solve your problem, but nothing better comes to mind at the moment. --------------------------------------------------------------------------- Prof. Michael Feldman Department of Electrical Engineering and Computer Science The George Washington University Washington, DC 20052 202-994-5253 mfeldman@seas.gwu.edu ---------------------------------------------------------------------------