delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/04/05/07:30:35

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Trace-PostClient-IP: 68.147.131.211
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT Invalid>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: function question
Organization: Systematic Software
Message-ID: <b0f270huqui0ubniojqksf160flcht0ath@4ax.com>
References: <106vune1fu63e7a AT corp DOT supernews DOT com> <c4puki$2kov8r$1 AT ID-227552 DOT news DOT uni-berlin DOT de> <1071n4u4qfhn0a2 AT corp DOT supernews DOT com> <c4quct$2f3pcq$2 AT ID-227552 DOT news DOT uni-berlin DOT de> <1072d9b9h7blrb8 AT corp DOT supernews DOT com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Lines: 49
Date: Mon, 05 Apr 2004 11:27:55 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse AT shaw DOT ca
X-Trace: pd7tw2no 1081164475 24.71.223.147 (Mon, 05 Apr 2004 05:27:55 MDT)
NNTP-Posting-Date: Mon, 05 Apr 2004 05:27:55 MDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Mon, 5 Apr 2004 06:26:06 -0400 in comp.os.msdos.djgpp, "Bill
Cunningham" <nospam AT nspam DOT net> wrote:

>> >     Perhaps int ma(int np[]={}) may have been more what I was looking
>for
>> > and intending?
>>
>> I haven't a clue what you think that's supposed to mean.  Please explain
>> in either C or discursive English.  Your combination of English and
>> something-that-isn't-C is not at all clear.
>
>I've seen this in either k&r2 or a C++ book. Can't remember which.
>    An array say char array1[]={};

Don't use constructs you've seen and don't understand. 

Write down in natural language, in program comments, what you want the
program to do, point by point. 
Then add the code to do what the comments say. 
If you add code not covered by the existing comments, add a comment to
say what the added code does. 

>It's initializing an array to how a yet indetermined number of elements.

ISTM it's determining the array contains zero elements. 
How does this book suggest you determine the number of elements? 
Is the book by a guy called Herb Schildt? 
If so, throw it in the garbage immediately! 

>C is a small language. But it the beginning can be very confusing. At least to
>me. Most newbies find pointers to be confusing and I'm still not quite sure
>where & always comes into play.

& is the address of operator, used at your current level for arguments
whose values are returned by scanf() and other library functions. 
At the next level, you use it for returning values from functions into
arguments. 

>I find among good C programmers that some
>that are good and some that are greater. Depends on their experience I
>guess.

What does this mean, or is it merely stating the obvious? 

-- 
Thanks. Take care, Brian Inglis 	Calgary, Alberta, Canada

Brian DOT Inglis AT CSi DOT com 	(Brian dot Inglis at SystematicSw dot ab dot ca)
    fake address		use address above to reply

- Raw text -


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