<div dir="ltr">Well, somebody had to have done it! <div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 3, 2017 at 1:22 PM, Larry Stewart <span dir="ltr"><<a href="mailto:l.simh@stewart.org" target="_blank">l.simh@stewart.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I took the liberty of cross posting this earlier to TUHS and I got <div>an authoritative answer :)<div>-Larry</div><div><br><div><br><blockquote type="cite"><div>Begin forwarded message:</div><br class="m_3440022190790989235Apple-interchange-newline"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>From: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">Ken Thompson <<a href="mailto:ken@google.com" target="_blank">ken@google.com</a>><br></span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>Subject: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif"><b>Re: [TUHS] Fwd: [Simh] An abandoned piece of K&R C</b><br></span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>Date: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">2017, November 3 at 2:30:08 PM EDT<br></span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>To: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">Lawrence Stewart <<a href="mailto:stewart@serissa.com" target="_blank">stewart@serissa.com</a>><br></span></div><br><div><div>it's news to me.<br><br><br>On Fri, Nov 3, 2017 at 5:53 AM, Lawrence Stewart <<a href="mailto:stewart@serissa.com" target="_blank">stewart@serissa.com</a>> wrote:<br><blockquote type="cite">This caught my attention.  Did early C really have min and max?  Were they<br>used for anything?  In those days I was a BCPL user, which IIRC, did not<br>have such things.<br><br>-Larry<br><br>Begin forwarded message:<br><br>From: Leo Broukhis <<a href="mailto:leob@mailcom.com" target="_blank">leob@mailcom.com</a>><br>Subject: [Simh] An abandoned piece of K&R C<br>Date: 2017, November 3 at 1:14:42 AM EDT<br>To: "<a href="mailto:simh@trailing-edge.com" target="_blank">simh@trailing-edge.com</a>" <<a href="mailto:simh@trailing-edge.com" target="_blank">simh@trailing-edge.com</a>><span class=""><br><br><a href="https://retrocomputing.stackexchange.com/q/4965/4025" target="_blank">https://retrocomputing.<wbr>stackexchange.com/q/4965/4025</a><br><br><br>In the UNIX V7 version of the C language, there were the /\ (min) and the \/<br>(max) operators. In the source of the scanner part of the compiler,<br><br></span><span class="">case BSLASH:<br>    if (subseq('/', 0, 1))<br>        return(MAX);<br>    goto unkn;<br><br>case DIVIDE:<br>    if (subseq('\\', 0, 1))<br>        return(MIN);<br>...<br><br>However, attempting to use them reveals that the corresponding part in the<br>code generator is missing. Trying to compile<br><br>foo(a, b) { return a \/ b; }<br><br>results in<br><br>1: No code table for op: \/<br><br>The scanner piece survived in the copies of the compiler for various systems<br>for several years. I tried to look for copies of the code generator table<br>which would contain an implementation, but failed. Has anyone ever seen a<br>working MIN/MAX operator in K&R C?<br><br>Thanks,Leo<br><br></span><span class="">______________________________<wbr>_________________<br>Simh mailing list<br><a href="mailto:Simh@trailing-edge.com" target="_blank">Simh@trailing-edge.com</a><br><a href="http://mailman.trailing-edge.com/mailman/listinfo/simh" target="_blank">http://mailman.trailing-edge.<wbr>com/mailman/listinfo/simh</a><br><br><br></span></blockquote></div></div></blockquote></div><br></div></div></div><br>______________________________<wbr>_________________<br>
Simh mailing list<br>
<a href="mailto:Simh@trailing-edge.com">Simh@trailing-edge.com</a><br>
<a href="http://mailman.trailing-edge.com/mailman/listinfo/simh" rel="noreferrer" target="_blank">http://mailman.trailing-edge.<wbr>com/mailman/listinfo/simh</a><br></blockquote></div><br></div>