Yes, rock on! <br><br>I wasn't aware that we could implement functions of this kind. Thank you very much.<br>-Chris<br><br><div class="gmail_quote">On Tue, Jul 10, 2012 at 8:41 AM, Michiel Sovijarvi-Spape <span dir="ltr"><<a href="mailto:mspape@cognitology.eu" target="_blank">mspape@cognitology.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Like you, I thought, that is pretty odd, but you seem correct anyway. Nonetheless, there's an argument to be made against packing all sorts of superfluous operations in a programming language (like VBA), if you're not using them and are easily able to add them yourself. So, just add to your user script:<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Function</span><span style="font-size:10.0pt;font-family:"Courier New""> min(inx </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">As</span><span style="font-size:10.0pt;font-family:"Courier New""> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Variant</span><span style="font-size:10.0pt;font-family:"Courier New"">, iny </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">As</span><span style="font-size:10.0pt;font-family:"Courier New""> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Variant</span><span style="font-size:10.0pt;font-family:"Courier New"">) </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">As</span><span style="font-size:10.0pt;font-family:"Courier New""> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Variant</span><span style="font-size:10.0pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">      </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">If</span><span style="font-size:10.0pt;font-family:"Courier New""> inx < iny </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Then</span><span style="font-size:10.0pt;font-family:"Courier New""> min = inx </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Else</span><span style="font-size:10.0pt;font-family:"Courier New""> min = iny      <u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">End</span><span style="font-size:10.0pt;font-family:"Courier New""> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Function</span><span style="font-size:10.0pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Now, writing <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">TextDisplay1.Text = min(5,3) <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">for example, will show "3". Rock on, no?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Mich<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a> [mailto:<a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>] <b>On Behalf Of </b>Chris<br>
<b>Sent:</b> 10 July 2012 13:57<br><b>To:</b> <a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a><br><b>Subject:</b> Is there no min() function in ebasic?<u></u><u></u></span></p></div><div>
<div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I realize I must be overlooking something, but I cannot find the minimum function.  If I just want the smaller of two variables, do I really have to construct an if statement for that? <br>
<br>I realize that I can also put them in a summation object and use summation.min; or I could put them in an array and sort it; but surely the min() function must exist, right? <u></u><u></u></p><p class="MsoNormal">-- <br>
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br>To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/vVI7xbobw3YJ" target="_blank">https://groups.google.com/d/msg/e-prime/-/vVI7xbobw3YJ</a>.<br>
To post to this group, send email to <a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br>To unsubscribe from this group, send email to <a href="mailto:e-prime+unsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>
For more options, visit this group at <a href="http://groups.google.com/group/e-prime?hl=en" target="_blank">http://groups.google.com/group/e-prime?hl=en</a>.<u></u><u></u></p></div></div></div></div><div class="HOEnZb"><div class="h5">


<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br>
To post to this group, send email to <a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="mailto:e-prime%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>

For more options, visit this group at <a href="http://groups.google.com/group/e-prime?hl=en" target="_blank">http://groups.google.com/group/e-prime?hl=en</a>.<br>


</div></div></blockquote></div><br>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.<br />

For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.<br />