Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Sun, 2 Mar 2025 17:50:07 +0100 Organization: A noiseless patient Spider Lines: 38 Message-ID: References: <5K%wP.111375$_N6e.32377@fx17.iad> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Sun, 02 Mar 2025 17:50:09 +0100 (CET) Injection-Info: dont-email.me; posting-host="cc58bd9003c7ab6704d23eaebf50d89b"; logging-data="914468"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4HR/aQoIhGWzd7cbCyiQL" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:hEDACXKeE/4jkRiq74tLK13lqfE= X-Enigmail-Draft-Status: N1110 In-Reply-To: <5K%wP.111375$_N6e.32377@fx17.iad> Bytes: 3112 On 02.03.2025 17:32, Scott Lurndal wrote: > Janis Papanagnou writes: >> On 01.03.2025 23:20, Lawrence D'Oliveiro wrote: >>> On Sat, 1 Mar 2025 21:32:59 +0100, Janis Papanagnou wrote: >>> >>>> My guess is that this form is just an informal syntax mimicking Perl's >>>> function parameter passing ... >>> >>> The idea of passing arguments by keyword predates Perl. >> >> That wouldn't surprise me. - I know it from Perl. - Which other >> (earlier) languages do you have in mind? - What's its origin? > > VAX-11 Pascal supported it (and a form of comment that you would dislike). Interesting. (I didn't know that DEC supported a Pascal dialect.) WRT that comment; I think that {...} is not worse than the (*...*) variant we often see. - The main point is, though, how it fits in the language. - "C" is already full of punctuation characters, and especially the '*' is existing in many contexts. Pascal, OTOH, is very text-biased; so its two comment variants don't annoy [me] too much. (The "open end" comment property is not dominating here.) > > Total_memory := 0; > REPEAT > Ss_status := $GETJPI( PIDADR := Wild_pid, EFN := 4, ITMLST := Jpi_list ); > IF ODD( Ss_status ) AND (Terminal_len <> 0) THEN > BEGIN > $WAITFR( 4 ); { Wait for asynch stuff to return } > What's that '$' preceding the function names? (I don't recall that from the Pascal standard or from the versions I programmed with.) Janis