Deutsch   English   Français   Italiano  
<v6rcr5$320pj$1@dont-email.me>

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

Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bart <bc@freeuk.com>
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 14:59:01 +0100
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <v6rcr5$320pj$1@dont-email.me>
References: <v66eci$2qeee$1@dont-email.me> <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> <86ikxd8czu.fsf@linuxsc.com>
 <v6mggd$20g3f$1@dont-email.me> <20240710213910.00000afd@yahoo.com>
 <v6mm02$21cpb$1@dont-email.me> <865xtc87yo.fsf@linuxsc.com>
 <v6ol14$2fdrj$1@dont-email.me> <87msmnu5e3.fsf@nosuchdomain.example.com>
 <v6pdcf$2jijk$1@dont-email.me> <87frsfu0yp.fsf@nosuchdomain.example.com>
 <v6pfqj$2jijk$3@dont-email.me> <v6r4um$30q95$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 12 Jul 2024 15:59:01 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="70309d0afdade4e9fabfb798d5d70205";
	logging-data="3212083"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/uyici0cg6gjlQO4IgLn0Y"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:j5Pl5uX6OjMy6OnvXLZDytVX6w8=
Content-Language: en-GB
In-Reply-To: <v6r4um$30q95$1@dont-email.me>
Bytes: 3263

On 12/07/2024 12:44, Janis Papanagnou wrote:
> On 11.07.2024 22:37, bart wrote:
>> On 11/07/2024 21:29, Keith Thompson wrote:
>>> bart <bc@freeuk.com> writes:
>>>>
>>>> This my first comment on the subject:
>>>>
>>>> "Arrays are passed by reference:
>>>>     ...
>>>> Although ..."
>>>
>>> And that statement was incorrect, even with the "Although".
>>
>> So arrays are passed by value? Gotcha.
> 
> Neither is true. - Tertium datur!
> 
> "Array passing" is in "C" realized using a pointer passing
> mechanism where the pointer is passed "by value".
> 
> Neither an array is passed [by value] nor there's a "call
> by reference" mechanism in "C".

So how are the elements of the caller's array accessed?

No copies have been supplied to the caller. So access is by ... ?

Look, there are only two choices: 'pointer' and 'reference', which in C 
are more or less the same thing:

"6.2.5p20 ... A pointer type describes an object whose value provides a 
reference to an entity of the referenced type."

So I said 'arrays are passed by reference'; maybe I should have said 
'array elements are passed by reference' (which suggests that each has 
its own reference), so shoot me.

But everyone was so keen to prove me wrong and incapable of understanding.



> This has been explained (also with references to original
> sources) to you many times.


Could you be a bit more patronising, please?