From: walker@twix.unx.sas.com (Doug Walker)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: SAS/C 6.0 Details (LONG!)
Date: 19 Aug 92 13:52:27 GMT
Article-I.D.: unx.Bt8H7F.BL8
Organization: SAS Institute Inc.
Originator: walker@twix.unx.sas.com


In article <1992Aug18.203629.22286@fcom.cc.utah.edu>, val@news.ccutah.edu (Val Kartchner) writes:
|> I'm looking forward to all of this.  Can a plain non-developer type get
|> AmigaGuide to develop (shareware/freeware) with?

I'm sure that you could get AmigaGuide and develop hypertext documents,
but I'm not so sure that you would be allowed to redistribute it
freely.  In order to distribute amigaguide.library, we signed an
addendum to the WorkBench license agreement that we have signed
with Commodore that allowed us to do so.

|> : You can designate autoinitialization functions that you want the startup
|> : code to call automatically before it calls your main routine.  You can
|> : also designate autotermination functions that you want the termination
|> : code to call after main returns.
|> : 
|> This is beginning to sound like C++.  When will SAS be releasing their C++
|> compiler. (I may wait or I may go with G++.)

The SAS/C++ project is still alive, but we are more than a year from
shipping at this point.  We are doing our own C++ translator in-house,
and that will be ready 4Q92; we then must port it to the Amiga, make
the necessary changes in CPR and the other tools, write the Amiga-
specific parts of the documentation, and so forth.  This is no small
project, so please don't take my "more than a year" statement as
meaning it will be ready in September '93 - the fact is that we just
don't know when it will be ready, so there is currently no schedule
for it.

|> : System library bases that are not defined in your code are automatically
h|> : opened and initialized.  This means that you do not need to explicitly
|> : call OpenLibrary to initialize libraries such as intuition.library,
|> : graphics.library, and others.
|> : 
|> What exactly does this mean?  Does this mean that ALL Commodore provided
|> libraries will be openned and initialized, or ALL libraries currently
|> residing in the libs: directory, or something else?  This will take up a
|> lot of memory even if I don't need these libraries.

If you declare a library base but do not define it, like this:

   extern struct IntuitionBase *IntuitionBase;

then the definition for that library base gets pulled in from the link
library.  This also happens in V5.x.  However, in V6.0, there are two
FUNCTIONS defined in the same module as IntuitionBase - one is an
autoinitialization function that gets run before main(), one is an
autotermination function that gets run after main().  The first one
opens intuition.library, the second one closes it.

Therefore, your code never opens a library base that it has not 
declared.  If you never declare IntuitionBase, intuition.library is
not opened.

Also, some people actually DEFINE the library bases:

   struct IntuitionBase *IntuitionBase;

In this case, the symbol is already satisfied at link time and the
linker doesn't need to pull the version in the link libraries
into your program.  Therefore, the autoinit/autoterm code is not
pulled in.

One further note:  the autoinit/autoterm functions use a static
variable to hold the result of the OpenLibrary call.  This means
that if your code explicitly does an OpenLibrary and CloseLibrary,
and then sets the library base to NULL, the library open count is
still correct.

|> I know that this version is 1.2, 1.3, and 2.0 compatible.  (I shouldn't
|> have deleted it from the posting.)  I hope that SAS continues to support
|> at least 1.3 for a while since I can't go beyond 1.3 with my A1000.  (I know,
|> but I may upgrade once the new AA chipset is out.)

I know that some people have managed to make 2.0 run on a 1000, but I'm
not sure how.  I'm sure someone on the net can tell you.

There was some discussion about 1.3 support in our beta tester 
conference on BIX at one time, with feelings about equally divided
between trashing support for pre-2.0 OS's and supporting them.
My decision was that there are just too many people out there running
1.3 to drop support for it.  About the only things you'll be missing
under 1.3 are file requesters for various tools (you get console 
windows to type the filename into instead) and the fstat() function,
which can't work under 1.3 because it uses a 2.0-only DOS call.  Since
1.3 doesn't come with AREXX, you are limited to using the message
browser with our editor unless you purchase AREXX seperately, of course.

-- 
  *****
=*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
 *|. o.| ||                                          1200/2400/9600 Dual
  | o  |//     For all you do, this bug's for you!
  ====== 
usenet: walker@unx.sas.com                            bix: djwalker 
Any opinions expressed are mine, not those of SAS Institute, Inc.
Newsgroups: comp.sys.amiga.programmer