Deutsch English Français Italiano |
<v6r5bi$30q5c$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams <thiago.adams@gmail.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 08:51:13 -0300 Organization: A noiseless patient Spider Lines: 40 Message-ID: <v6r5bi$30q5c$1@dont-email.me> References: <v66eci$2qeee$1@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> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 12 Jul 2024 13:51:14 +0200 (CEST) Injection-Info: dont-email.me; posting-host="925cc8ffc86b21a072102566fd54d66a"; logging-data="3172524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Vg1cYuFIXDI+xszg2A79s/3fc6nWHuAo=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:z7si6pC/Pb5Wm6G0TVSnUAUgOGU= In-Reply-To: <v6pdcf$2jijk$1@dont-email.me> Content-Language: en-US Bytes: 2677 On 11/07/2024 16:56, bart wrote: > The language could have helped a little by making this invalid: > > int A[20]; > > void F(int B[20]) {} The declaration does not correspond of the real type because there is no type to represent that. In cake, I am thinking in create the type "pointer to the first element of N". Then, if this was created in the past the syntax could be: int A[20]; void F(int *.[20] B) { } But nowadays we don't need to change the current syntax for parameters, just leave as it is. The syntax "pointer to the first element of N" can be used in other situations. In cake, I have a warning if you use B as pointer, for instance: int A[20]; void F(int B[20]) { B = 0; //warning } If the user wants to do that he can change the declaration to int *B. But now the size is lost. The type "pointer to the first element of N" fixes that.