Deutsch English Français Italiano |
<20240712045301.394@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.c Subject: Re: technology discussion =?UTF-8?Q?=E2=86=92?= does the world need a "new" C ? Date: Fri, 12 Jul 2024 12:14:40 -0000 (UTC) Organization: A noiseless patient Spider Lines: 66 Message-ID: <20240712045301.394@kylheku.com> 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> <v6qgpu$2t6p7$3@dont-email.me> <v6r33m$30grj$1@dont-email.me> <v6r3iv$30gru$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 12 Jul 2024 14:14:40 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ce9d7750f6a622c8d90995dce7832ee4"; logging-data="3164361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kDuQQxmoIfhGWxvKBkT3SHDpIfDUapAc=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:KDPNVbBIgbomy9u204CNka4fiHI= Bytes: 4074 On 2024-07-12, bart <bc@freeuk.com> wrote: > It's clearly not by value. It's apparently not by reference. You can't > get away with saying they are not passed, as clearly functions *can* > access array data via parameters. Actually, you probably can get away with saying that it is "passed by reference". The formal term that doesn't apply is "call by reference"; that's what C doesn't have. "call by reference" emphasizes that the function call mechanism provides the reference semantics for a formal parameter, not that some arbitrary means of passage of the data has reference semantics. The following also achieves "pass by reference": int *global; void child(void) { printf("%d\", global[13]); } void parent(void) { int array[20]; global = array; child(); } "pass" does not mean as a formal parameter. For instance "message passing" (e.g. from one thread to another) doesn't use formal parameters. ISO C uses the "refer" word and derivatives thereof in connection with pointers: - "If an attempt is made to refer to an object defined with a volatile-qualified type through use of an lvalue with non-volatile-qualified type, the behavior is undefined". The type from which a pointer is derived is called the "referenced type": - "The construction of a pointer type from a referenced type is called ‘‘pointer type derivation’’ [C99] A footnote in C99 used the word "dereferencing" to describe the action of the unary * operator. This word is commonly used in the C programming circles: - "Among the invalid values for dereferencing a pointer by the unary * operator are a null pointer, ..." Another footnote in C99 uses "referenced" describing the relationship of an pointer to the target object: - "In other words, E depends on the value of P itself rather than on the value of an object referenced indirectly through P. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca