Hi, On Sat, Dec 03, 2022 at 04:20:30PM +0100, fenug...@mail.com wrote: > > Sent: Saturday, December 03, 2022 at 10:29 AM > > From: "Rene Kita" <m...@rkta.de> > > > 1- avoid bundling an assignment in a conditional, `if ((var = func()) > > > > other_var) ....` > > > > Indicating that it indeed is meant to be an assignment is usually done > > by wrapping it in parentheses. > > That looks to me like a "workaround" - I really see no advantage to cramming > all that code on one line. Terseness sacrifices readability in this case IMO.
How would you write while ((entry = readdir(dir)) != NULL) { something using entry; } or while ((c = fgetc(f)) != EOF) { something using c; } in a more readable way without using that construct? Best regards, Daniel _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel