<div dir="auto">That sort of reminds me of a friend of mine who was using a CPU (and compiler) whose NULL address was 0x80000000.<div dir="auto"><br></div><div dir="auto">Caused no end of trouble when porting code from programmers who instead of comparing a pointer with NULL just checked it against zero...</div><div dir="auto"><br></div><div dir="auto">I.e. they did this:</div><div dir="auto"><br></div><div dir="auto">if (my_pointer) address_is_valid();</div><div dir="auto"><br></div><div dir="auto">Instead of:</div><div dir="auto"><br></div><div dir="auto">if (my_pointer != NULL) address_is_valid();</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 8 Dec 2020, 07:34 Ben Bradley, <<a href="mailto:ben.pi.bradley@gmail.com">ben.pi.bradley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The C99 standard points out one of the subtle differences between C<br>
and C++, as well as between one standard and the previous.The<br>
differences appear to have grown as the languages have gone through<br>
revisions.<br>
<br>
In the original C (and even in C++ today to remain compatible with so<br>
much code that operates this way), a "boolean" was just an integer,<br>
with false being the value 0 and true being any other value. C++ has<br>
the intrinsic type bool as part of the language which can have a value<br>
of either true or false, and this is preferred over using integers for<br>
boolean operations. C99 copied this, NOT by adding an intrinsic type,<br>
but by adding the stdbool.h header file to define these, as explained<br>
at this link. Just reading through it shows how "minute" changes in<br>
standards can cause problems with legacy code. Long story short, this<br>
is why programming can be such a pain:<br>
<a href="https://stackoverflow.com/questions/4767923/c99-boolean-data-type" rel="noreferrer noreferrer" target="_blank">https://stackoverflow.com/questions/4767923/c99-boolean-data-type</a><br>
<br>
On Tue, Dec 8, 2020 at 1:48 AM john slee <<a href="mailto:indigoid@oldcorollas.org" target="_blank" rel="noreferrer">indigoid@oldcorollas.org</a>> wrote:<br>
><br>
><br>
><br>
> On Tue, 8 Dec 2020 at 07:48, Michael E Caloroso <<a href="mailto:mec.forumreader@gmail.com" target="_blank" rel="noreferrer">mec.forumreader@gmail.com</a>> wrote:<br>
> > Give me mid-level languages like C any day. You get non-cryptic error<br>
> > messages that are solved quickly and the language has been cast in<br>
> > stone since the 1980s.<br>
><br>
> If by "stone" you actually mean "mud", sure. The standard was updated in 1999 (C99), 2011 (C11) and again in 2018 (C17). Some major updates in there.<br>
><br>
> O'Reilly have a pretty good book covering the C99 changes called "21st Century C"<br>
><br>
> <a href="https://www.oreilly.com/library/view/21st-century-c/9781491904428/" rel="noreferrer noreferrer" target="_blank">https://www.oreilly.com/library/view/21st-century-c/9781491904428/</a><br>
><br>
> John<br>
><br>
> _______________________________________________<br>
> Synth-diy mailing list<br>
> <a href="mailto:Synth-diy@synth-diy.org" target="_blank" rel="noreferrer">Synth-diy@synth-diy.org</a><br>
> <a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
> Selling or trading? Use <a href="mailto:marketplace@synth-diy.org" target="_blank" rel="noreferrer">marketplace@synth-diy.org</a><br>
_______________________________________________<br>
Synth-diy mailing list<br>
<a href="mailto:Synth-diy@synth-diy.org" target="_blank" rel="noreferrer">Synth-diy@synth-diy.org</a><br>
<a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
Selling or trading? Use <a href="mailto:marketplace@synth-diy.org" target="_blank" rel="noreferrer">marketplace@synth-diy.org</a><br>
</blockquote></div>