Polytropon free...@edvax.de wrote:
FreeBSD defines additional exit codes to specify the reason for
exiting more precisely in /usr/include/sysexits.h - for your
example, exit(EX_USAGE); would be a good exit code.
Actually, no. The purpose of the sysexits.h codes is for
communication between
On Tue, 31 Mar 2009 18:53:51 -0400, William Gordon Rutherdale
will.rutherd...@utoronto.ca wrote:
Are you serious?
Serious question, yes.
You set the standard on a given project. You decide
whether you are using spaces or tabs. If spaces, you decide how many
spaces per indent level.
Oliver Fromme wrote
Of course this is purely a matter of taste and personal
preference. My preference is similar to yours, but my
main reasoon is to save space. I think it is a ridiculous
waste of space if every third line consisted only of a
sole brace (opening or closing). To my eye, such
Polytropon wrote:
Okay, now I understand what you mean. Consistency refers to
the usage of spacing / tabbing for a given project that is
adopted by several programmers. Yes, I agree with that: It's
a very bad idea to have many different styles within the same
project.
. . .
When I need to read
I don't want to start a style debate, but forgive me the
following annotations:
1. Use the tab character for indentation. You can set its
length with your favourite editor (e. g. mcedit: F9,
Options, General; joe: ^TD). Don't waste with spaces.
2. The main() function should be declared as
On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale
will.rutherd...@utoronto.ca wrote:
Tabbing is the worst form of indentation. It is *much* better to use
spaces consistently.
may I ask what exactly you mean by consistently? I've seen
various opinions about how many spaces make up
Polytropon wrote:
I don't want to start a style debate, but forgive me the
following annotations:
1. Use the tab character for indentation. You can set its
length with your favourite editor (e. g. mcedit: F9,
Options, General; joe: ^TD). Don't waste with spaces.
2. The main() function
On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale
will.rutherd...@utoronto.ca wrote:
Tabbing is the worst form of indentation. It is *much* better to use
spaces consistently.
may I ask what exactly you mean by consistently? I've seen
various opinions about how many spaces make up
This isn't a BSD question. It's just about elementary C. As other
people pointed out, you could have easily caught it anyway just by
turning on warnings.
-Will
Gary Kline wrote:
people, i've been under the weather for days and will probably be for a few
more.
new and TEMPORARY meds dont
Tabbing is the worst form of indentation. It is *much* better to use
spaces consistently.
stupid discussion and off topic. everybody write code as he/she like, or
as a team decided if it's not single person work.
only end result matters.
___
On Tue, Mar 31, 2009 at 11:21:22AM +0200, Polytropon wrote:
I don't want to start a style debate, but forgive me the
following annotations:
1. Use the tab character for indentation. You can set its
length with your favourite editor (e. g. mcedit: F9,
Options, General; joe: ^TD). Don't
Josh Carroll wrote:
[...]
Note also that your main should have an int return type and should
return a value.
His main() function _did_ have an int return type (it
wasn't declared to be void), but of course it's better
style to write int explicitly.
By the way, FreeBSD's style(9) recommends
Wojciech Puchar wrote:
Tabbing is the worst form of indentation. It is *much* better to use
spaces consistently.
stupid discussion and off topic. everybody write code as he/she like,
or as a team decided if it's not single person work.
only end result matters.
you know real
On Tue, 31 Mar 2009 11:21:22 +0200
Polytropon free...@edvax.de wrote:
4. Use the predefined return codes, don't hardcode them.
FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
maximum compatibility (such as with Linux). There are
more exit codes for differentiation, but they're
On Tue, 31 Mar 2009 19:20:17 +0100, Bruce Cran br...@cran.org.uk wrote:
Linux seems to have adopted sysexits.h too, which provides error codes
such as EX_USAGE and EX_CANTCREAT.
Good to know this, thanks. I'm not a big Linux user and a much
smaller Linux programmer (read: I don't program for
On Tue, 31 Mar 2009 08:54:17 -0700, Gary Kline kl...@thought.org wrote:
1. Use the tab character for indentation. You can set its
length with your favourite editor (e. g. mcedit: F9,
Options, General; joe: ^TD). Don't waste with spaces.
Ja, been doing this since 1978. Does
On Tue, 31 Mar 2009 13:59:16 +0200, Polytropon free...@edvax.de wrote:
When I would compare both indentation forms, I'd say that tabbing
is the better form because
+ you can set your individually preferred tab with using the
settings of your editor, be it 1, 4 or 8,
I like using TAB for
On Tue, Mar 31, 2009 at 07:50:22AM -0400, William Gordon Rutherdale wrote:
This isn't a BSD question. It's just about elementary C. As other
people pointed out, you could have easily caught it anyway just by
turning on warnings.
-Will
yep, you're right. i did have gcc aliased
On Tue, Mar 31, 2009 at 09:01:42PM +0200, Polytropon wrote:
On Tue, 31 Mar 2009 08:54:17 -0700, Gary Kline kl...@thought.org wrote:
1. Use the tab character for indentation. You can set its
length with your favourite editor (e. g. mcedit: F9,
Options, General; joe: ^TD). Don't
Polytropon wrote:
On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale
will.rutherd...@utoronto.ca wrote:
Tabbing is the worst form of indentation. It is *much* better to use
spaces consistently.
may I ask what exactly you mean by consistently? I've seen
various opinions
people, i've been under the weather for days and will probably be for a few
more.
new and TEMPORARY meds dont like me, ugh.
can anybody clue me in why the followin joinline program fails to catch if argc
== 1?
/*
* simple prog to join all | very nearly all lines of a text file that
* make
On Mon, Mar 30, 2009 at 10:57 PM, Gary Kline kl...@thought.org wrote:
people, i've been under the weather for days and will probably be for a few
more.
new and TEMPORARY meds dont like me, ugh.
can anybody clue me in why the followin joinline program fails to catch if
argc == 1?
/*
*
main(int argc, char *argv[])
On Mon, Mar 30, 2009 at 8:57 PM, Gary Kline kl...@thought.org wrote:
people, i've been under the weather for days and will probably be for a few
more.
new and TEMPORARY meds dont like me, ugh.
can anybody clue me in why the followin joinline program fails to
Just 5 minutes too late. :)
On Mon, Mar 30, 2009 at 9:13 PM, Joshua Gimer jgi...@gmail.com wrote:
main(int argc, char *argv[])
On Mon, Mar 30, 2009 at 8:57 PM, Gary Kline kl...@thought.org wrote:
people, i've been under the weather for days and will probably be for a few
more.
new and
On Mon, Mar 30, 2009 at 11:08:57PM -0400, Josh Carroll wrote:
On Mon, Mar 30, 2009 at 10:57 PM, Gary Kline kl...@thought.org wrote:
people, i've been under the weather for days and will probably be for a few
more.
new and TEMPORARY meds dont like me, ugh.
can anybody clue me in why
25 matches
Mail list logo