delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/02/29/14:30:27

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Tim Nicholson <tim AT gizzy DOT dot DOT co DOT dot DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: error under DOS , symify output
Date: Sun, 29 Feb 2004 19:15:01 +0000 (UTC)
Organization: BT Openworld
Lines: 34
Message-ID: <c1tdnl$t2j$1@titan.btinternet.com>
References: <4041F822 DOT 2050603 AT acm DOT org> <20040229095149 DOT 09990 DOT 00000563 AT mb-m17 DOT aol DOT com>
NNTP-Posting-Host: host81-128-153-22.in-addr.btopenworld.com
Mime-Version: 1.0
X-Trace: titan.btinternet.com 1078082101 29779 81.128.153.22 (29 Feb 2004 19:15:01 GMT)
X-Complaints-To: news-complaints AT lists DOT btinternet DOT com
NNTP-Posting-Date: Sun, 29 Feb 2004 19:15:01 +0000 (UTC)
In-Reply-To: <20040229095149.09990.00000563@mb-m17.aol.com>
X-Accept-Language: en-us, en
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Yes, that should solve it, but like Hans-Bernhard Broeker, I found it 
almost impossible to follow the logic of your code. That is not to say 
that it is wrong, it is just the style of 'C' that you have adopted is 
horrendous, it reminds me of Commodore Basic ;-)

IMHO, placing all the instructions on one line just makes the code 
harder to read and therefore much harder to debug. You may also consider 
structuring your code in such away as to avoid the use of labels and the 
goto statement; again, a well-structured program is much easier to 
follow and debug, it is also much easier to expand as you do not need to 
keep track of all of the labels!

Of course, the compiler doesn't give a damn either way, but you will 
find that the output of symify is more meaningful if a given source line 
only refers to one statement.

Tim



Sterten wrote:



>>Which makes a lot of sense since you did not have an argument for
>>argv[2] right?
> 
> 
> I'd like to have the option for a 2nd argument,
> i.e. the program should run with 1 or 2 arguments.
> Well, I can check argc  and jump over
> that line
> 
> qwe=0;if(argc>1)qwe=argv[2][0];

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019