[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4697.0. "Has anybody else tried GCC?" by RGB::ROSE () Tue Apr 23 1991 13:05

	I tried out GCC. I had to add  math.lib to the libraries statement in
the SETUP script to get floating point to link. I couldn't get floating point
variables to work with printf statements. 

	printf("a = %f\n",a);

produces

	a = f

%e didn't work either. I tried converting the FP result to integer and printing
it with a %d and that worked. It looks like it computes FP numbers OK but
just can't print them.

	It worked with C= header files. In general, it's bigger, runs slower,
and makes bigger executables than DICE. I think I am going to get the registered
version of DICE.

	Can anyone recommend a good debugger to use with DICE?
T.RTitleUserPersonal
Name
DateLines
4697.1Rolling DICE.ULTRA::BURGESSMad Man across the waterWed Apr 24 1991 12:1026
re                         <<< Note 4697.0 by RGB::ROSE >>>
>                        -< Has anybody else tried GCC? >-

	Yes, I had a similar experience and have come to the same 
conclusion about registering for DICE after having tried it, GCC and
NorthC {FF 384}.  I hacked around for a while trying to hook up CCLib 
to DICE; Bah, just gotta have the Amigalib anyway and the $50 includes 
that plus the manual pages for DME - my cheque went in the mail about 
the same time as my tax returns did, watching the mail box every day 
now.

>	Can anyone recommend a good debugger to use with DICE?

	Shouldn't LINT work ?   Well, given that I'm still struggling 
to learn C itself, my programs are still pretty simple.  I'm relying on 
the power of DME to help me find syntactic and usage errors fairly 
quickly.

BTW, I'm at the conclusion that I have learned quite a lot more about 
the nature of C environments by hacking around with 3 PD/Shareware 
versions than if I had bought a commercial quality package straight 
away - albeit at the expense of progressing in C itself, I think this 
will pay off,,,   ,,,,,umm eventually.

	Reg

4697.2NOTIBM::MCGHIEThank Heaven for small Murphys !Fri Apr 26 1991 00:0712
I was hacking about with DICE the other night. Typed in the
simplesprite example from Rob Peck's book.

Strangely enough, once I had got the typograhpicals errors
out of the way, the program compiled and run !!

Amazing.  Though I did have to resort to using some Commodore
include files.

Another example of good quality public domain/shareware.

Mike
4697.3GOBAMA::WILSONTLLead Trumpet (Read that...LEED!)Fri Apr 26 1991 09:555
    DICE comes on the first issue of Amiga Tech Journal.  I don't know yet
    whether it's the PD version or the full blown version.  I will check it
    tonight.
    
    Tony
4697.4May have answered my own question...GOBAMA::WILSONTLLead Trumpet (Read that...LEED!)Fri Apr 26 1991 09:592
    The magazine (I just discovered) says that all files on the disk are
    freely distributable, thus it is probably the PD version.
4697.5Dice updateXSNAKE::WILSONTLLead Trumpet (Read that...LEED!)Wed May 08 1991 16:0419
Checked out DICE compiler (PD version).  I entered several examples and 
compiled then only to discover that it will compile simple examples, but 
certain ANSI standard items are "missing".  One of them is ARRAY 
INITIALIZATION (e.g., int ArrayList[] = {1,2,3,4,5,6,...}).  It seems that a 
large portion of windows programming requires bitmap initializing by precisely 
this mechanism.  If this is indeed the case, then this is an awfully big 
missing piece!  If the $50.00 version does no better, then DICE would be 
insufficient for a lot of Amiga programming, even if the Amiga includes come
with it.

I'm going to try GCC next to see how it does.  I was going to pay $50.00 for
DICE because it is a good, fast compiler otherwise, but I won't buy it until it
supports more features, particularly this one.  The docs distributed with it
say it will have this support RSN.  If anyone knows that this feature has been 
added for the registered version, please tell me.

Another question: Does SAS/Lattice C come with Amiga includes, etc.?

Tony
4697.6yupSAUTER::SAUTERJohn SauterWed May 08 1991 16:202
    Yes, SAS/C comes with Amiga includes, for both 1.3 and 2.0.
        John Sauter
4697.7DICE Array InitializationRGB::ROSEWed Sep 18 1991 00:0115
    	This is going back a ways in time, but back last May, it was
    concluded that DICE would not allow initialization of arrays; ie.
    
    int a[2] = {0,1};
    
    It turns out that DICE lets you do that for global variables, but if
    you declare it inside the scope of main() you have to declare it as
    "static"; ie.
    
    static int a[2] = {0,1};
    
    There appears to be differences between compilers on this point. VAX C
    and BORLAND C++ don't require the static declaration, but DICE and
    ULTRIX C do. Perhaps someone who is familure with the letter of ANSII
    can shed some light on this point.
4697.8partial answerWHAMMY::spodarykFor three strange days...Wed Sep 18 1991 13:2113
From the K&R 2nd Edition (ANSI C) p219

"The first edition did not countenance initialization of automatic structures,
unions or arrays.  The ANSI standard allows it, but only by constant construc-
tions unless the initializer can be expressed by a simple expression."

In English, yes automatic (ie. local) array initialization of arrays is
_allowed_ under ANSI C.  I don't know if ANSI requires that function or not...
How should the above sentence be interpreted: allows == requires?

I see a lot of different behavior among "ANSI" compliant compilers.

Steve
4697.9ANSI C Requires This FeatureTLE::RMEYERSRandy MeyersSun Sep 22 1991 16:5910
Re: .8

>In English, yes automatic (ie. local) array initialization of arrays is
>_allowed_ under ANSI C.  I don't know if ANSI requires that function or not...

In order for a compiler to conform to the ANSI C standard, it must support
the initialization of auto arrays by constant expressions.

I'm guessing that K&R used the word "allowed" to mean that an ANSI C
compiler allows the programmer to initialize auto arrays.