Deutsch   English   Français   Italiano  
<v6qgpu$2t6p7$3@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!npeer.as286.net!npeer-ng0.as286.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: =?UTF-8?Q?Re=3A_technology_discussion_=E2=86=92_does_the_world_need?=
 =?UTF-8?B?IGEgIm5ldyIgQyA/?=
Date: Fri, 12 Jul 2024 08:00:30 +0200
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <v6qgpu$2t6p7$3@dont-email.me>
References: <v66eci$2qeee$1@dont-email.me> <v6ard1$3ngh6$4@dont-email.me>
 <v6b0jv$3nnt6$1@dont-email.me> <87h6d2uox5.fsf@nosuchdomain.example.com>
 <v6d779$6rk5$2@dont-email.me> <v6e76u$c0i9$1@dont-email.me>
 <v6esqm$fian$2@dont-email.me> <v6f7vg$hgam$1@dont-email.me>
 <20240707164747.258@kylheku.com> <v6gl83$s72a$1@dont-email.me>
 <v6h8ao$ur1v$1@dont-email.me> <v6jhk3$1drd6$1@dont-email.me>
 <v6jiud$1dsjb$1@dont-email.me> <877cdur1z9.fsf@bsb.me.uk>
 <v6joi4$1epoj$1@dont-email.me> <871q42qy33.fsf@bsb.me.uk>
 <v6k6i0$1h4d3$1@dont-email.me> <87ed82p28y.fsf@bsb.me.uk>
 <v6m03l$1tf05$1@dont-email.me> <87r0c1nzjj.fsf@bsb.me.uk>
 <v6m716$1urj4$1@dont-email.me> <87ikxconq4.fsf@bsb.me.uk>
 <v6n8iu$24af0$1@dont-email.me> <20240711115418.00001cdf@yahoo.com>
 <v6oamt$2d8nn$1@dont-email.me> <v6oct4$2djgq$2@dont-email.me>
 <v6of96$2ekb0$1@dont-email.me> <v6ovfc$2hcpf$1@dont-email.me>
 <v6p4hf$2icph$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 12 Jul 2024 08:00:30 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0d63f29bdb823407c5eda4702e8b85d8";
	logging-data="3054375"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19oO5dkvcHANvOwzI6+y6rnZ5UVMMtLsbs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:NFiBHHhT6xzN2PHPpaUqhtRf06Q=
Content-Language: en-GB
In-Reply-To: <v6p4hf$2icph$1@dont-email.me>
Bytes: 3515

On 11/07/2024 19:25, bart wrote:
> On 11/07/2024 16:58, David Brown wrote:
>> On 11/07/2024 13:22, bart wrote:
> 
>>> If the original array has type T[N], then the T is passed, but the N 
>>> is lost. The [] is also lost:; it turns into *. But in C, that 
>>> doesn't matter too much; it can still index that object!
>>
> 
>>> (Here I'm talking about info attached to the parameter name; the type 
>>> itself may still have that N. Have I mentioned that C is mess?)
>>
>> You've mentioned very clearly that your understanding of C is a mess.  
>> C itself is quite simple here, 
> 
> Not it isn't. The fact that I can do this:
> 
>      void F(vector a) {}          // typedef byte vector[100];
> 
> and get the type of 'a' as 'byte*', sizeof(a) as 8, sizeof(*a) as 1, but 
> sizeof(vector) as 100, suggests all sorts of shenanigans.
> 
>> and the rules are not hard to understand. 
> 
> Ha ha ha! Of course you would say that. 
> 


Well, yes, I /did/ say that.

The rules for C are not the way I would have preferred, but they are 
straightforward to learn and consistent.  All you have to do is listen 
to what people tell you, read reliable information (such as the 
standards), and stop insisting that your confusing misunderstandings are 
correct.

I can understand when someone new to C gets mixed up about how arrays 
work.  I don't understand how someone can remain so stubbornly confused 
when they have been told how C /actually/ works.