Is there no min() function in ebasic?
Christopher Chatham
chathach at gmail.com
Tue Jul 10 13:01:32 UTC 2012
Yes, rock on!
I wasn't aware that we could implement functions of this kind. Thank you
very much.
-Chris
On Tue, Jul 10, 2012 at 8:41 AM, Michiel Sovijarvi-Spape <
mspape at cognitology.eu> wrote:
> Hi,****
>
> 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:****
>
> ** **
>
> Function min(inx As Variant, iny As Variant) As Variant****
>
> If inx < iny Then min = inx Else min = iny ****
>
> End Function****
>
> ** **
>
> Now, writing ****
>
> TextDisplay1.Text = min(5,3) ****
>
> for example, will show "3". Rock on, no?****
>
> Best,****
>
> Mich****
>
> ** **
>
> ** **
>
> ** **
>
> *From:* e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] *On
> Behalf Of *Chris
> *Sent:* 10 July 2012 13:57
> *To:* e-prime at googlegroups.com
> *Subject:* Is there no min() function in ebasic?****
>
> ** **
>
> 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?
>
> 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? ****
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/e-prime/-/vVI7xbobw3YJ.
> To post to this group, send email to e-prime at googlegroups.com.
> To unsubscribe from this group, send email to
> e-prime+unsubscribe at googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/e-prime?hl=en.****
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To post to this group, send email to e-prime at googlegroups.com.
> To unsubscribe from this group, send email to
> e-prime+unsubscribe at googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/e-prime?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120710/bbde025a/attachment.htm>
More information about the Eprime
mailing list