473,799 Members | 2,868 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which compiler for a learner of C?

I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

Downloaded Bloodshed Dev-C++

Very nice but the default auto-indent woupd break my heart as I depend
on indentation. This is how a loop is formatted by default.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
int a = 0, b = 7;

for (a = 0; a <= b; ++a)
{
printf("Hello again\n");
}
system("PAUSE") ;
return 0;
}

That } that fails to align as it closes the "for" loop really puts me
off. If anyone knows how to fix this, this looks a fine compiler. Is
it good in the opinion of more experienced C programmers?

Is Visual C++ Express a good compiler?

Is there another for the Win32 platform that is recommended?

Sep 27 '06 #1
46 2216
pkirk25 wrote:
I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

Downloaded Bloodshed Dev-C++

Very nice but the default auto-indent woupd break my heart as I depend
on indentation. This is how a loop is formatted by default.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
int a = 0, b = 7;

for (a = 0; a <= b; ++a)
{
printf("Hello again\n");
}
system("PAUSE") ;
return 0;
}

That } that fails to align as it closes the "for" loop really puts me
off. If anyone knows how to fix this, this looks a fine compiler. Is
it good in the opinion of more experienced C programmers?

Is Visual C++ Express a good compiler?

Is there another for the Win32 platform that is recommended?
Look lcc-win32 is a compiler system written for developing in C.
Not in C++.

Download it from
http://www.cs.virginia.edu/~lcc-win32

It is a controversial compiler but it comes with more than
Bloodshed, that is (apparently) no longer developed.

There is also a problem with the libraries.

This program:
#include <stdio.h>
int main(int argc, char *argv[])
{
long double d = 1e600L;

printf("%Le\n", d);
return 0;
}
will print
1.000000e+600
in lcc-win32, but in Bloodshed will print
-7.521098e-238

The libraries are not in phase with the compiler (gcc).
The program compiles with no warnings under Bloodshed,
but it gives wrong results.

http://www.cs.virginia.edu/~lcc-win32

Sep 27 '06 #2
jacob navia said:
pkirk25 wrote:
>>
Is there another for the Win32 platform that is recommended?

Look lcc-win32 is a compiler system written for developing in C.
But he asked for one that is recommended.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 27 '06 #3
pkirk25 said:
I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.
It still does C just fine, though. It's a very good C compiler with a fine
IDE. In fact, on the rare occasions when I use Windows, it's my C compiler
of choice. (And I'm Mr Anti-Microsoft!)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 27 '06 #4
Richard Heathfield wrote:
jacob navia said:

>>pkirk25 wrote:
>>>Is there another for the Win32 platform that is recommended?

Look lcc-win32 is a compiler system written for developing in C.


But he asked for one that is recommended.
I recommend it.

He was not asking for YOUR recommendation
YOUR EXCELLENCE :-)

Sep 27 '06 #5
Richard Heathfield wrote:
pkirk25 said:

>>I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.


It still does C just fine, though. It's a very good C compiler with a fine
IDE. In fact, on the rare occasions when I use Windows, it's my C compiler
of choice. (And I'm Mr Anti-Microsoft!)
The flaw that I pointed out doesn't disturb you of course:

This program:
#include <stdio.h>
int main(int argc, char *argv[])
{
long double d = 1e600L;

printf("%Le\n", d);
return 0;
}
will print
1.000000e+600
in lcc-win32, but in Bloodshed will print
-7.521098e-238

The libraries are not in phase with the compiler (gcc).
The program compiles with no warnings under Bloodshed,
but it gives wrong results.

What flaws are concerned, you seem to be very selective...
Sep 27 '06 #6
Jacob,

First off, let me say I respect waht you have already achieved.

As is often the case when people start with flowery openings, I'm
afraid I must say that your compiler is not for me.

For my first try, i just said no to usign a wizard for ny "hello world"
application.

The editor behaves like a DOS EDIT program. No syntax highlighting, no
folding, just a text file. vi with ctags is more user friendly.

Files are saved with the name you give them. My "hello world" failed
to compile because I didn't save the file as main.c as opposed to main.

I then tried the wizard. It presented me with 62 lines of code!

Usual options like Ctrl-A for the Editor to Select All didn't work.

As I have no idea which of the 62 lines are essential to my "Hello
World" appliaction and which are not, I quit.

So far, so hard for a learner. Then I did get annoyed about the
documentation.

Documentation in pdf? Really, given that the web is over 15 years old,
there is no excuse for using pdf where html offers more ease of use.

Microsoft with a building full of IDE experts on the Washington campus
edged you. I hope that isn't too hurtful.

Thanks for the link and work you have done.

Sep 27 '06 #7
jacob navia said:
Richard Heathfield wrote:
>jacob navia said:

>>>pkirk25 wrote:

Is there another for the Win32 platform that is recommended?

Look lcc-win32 is a compiler system written for developing in C.


But he asked for one that is recommended.

I recommend it.
Well well. There's a surprise.
He was not asking for YOUR recommendation
Indeed - but I doubt whether he will consider your recommendation impartial,
given that you are the maintainer for lcc-win32.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 27 '06 #8
jacob navia said:
Richard Heathfield wrote:
>pkirk25 said:

>>>I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.


It still does C just fine, though. It's a very good C compiler with a
fine IDE. In fact, on the rare occasions when I use Windows, it's my C
compiler of choice. (And I'm Mr Anti-Microsoft!)
The flaw that I pointed out doesn't disturb you of course:
No, it doesn't. The flaw you pointed out is to do with Bloodshed's
implementation, not Visual C++ 6.0.

<snip>
What flaws are concerned, you seem to be very selective...
Yes. When discussing Visual C++ 6.0, I do not find flaws in the Bloodshed
implementation to be particularly relevant.

Will you never tire of being *wrong*?

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 27 '06 #9
"pkirk25" <pa*****@kirks. netwrites:
Jacob,

First off, let me say I respect waht you have already achieved.

As is often the case when people start with flowery openings, I'm
afraid I must say that your compiler is not for me.
[snip]
Thanks for the link and work you have done.
Let me suggest to both of you that comp.compilers. lcc would be the
appropriate place to discuss this.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 28 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
2179
by: larry | last post by:
I was just looking at a demo training that mindleaders has on .net training: http://www.mindleaders.com/products/democourse3.asp And I don't believe this is correct or at least is misleading to me: "The search for an easy, productive, and very powerful programming language led to the birth of Visual C#. Visual C# incorporates the best features of Visual C++ and Visual Basic. Visual C# enables you to
0
273
by: Simon | last post by:
I've had enough of C# Learner. I've had enough of his complaining about using parentheses for every 'if' statement. I've had enough of his complaining about having to mix assignment of return value of methods with flow control, making writing code that's both readable and consistent, impossible. C# Learner is hindered by his complainging about C# being hindered by its predecessors and the Microsoft marketing department. If C# Learner...
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10269
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.