On 7/29/20 12:08 PM, Alex Tweedly via use-livecode wrote:

On 29/07/2020 18:57, Richard Gaskin via use-livecode wrote:
In the v9.6.1RC1 Release Notes there's this:

   Infinity constant
   The constant infinity has been added to the language in this release.
   As a result, theunquoted literal infinity is now reserved. Any
   existing uses of it should be quoted, as otherwiseit will resolve to
   the floating point value representing infinity, rather than the
   string "infinity".

What is the use-case prompting this?

A coupe of choices:

1. Less serious: It's a "bragging rights" thing. Every other (*almost*) computer language has a constant representing infinity, and as Livecode grows up, it felt it needed one too.

2. More serious: It is a reliable floating point number that can be represented in IEEE FP number space - and can therefore be relied on to act as you would expect in comparisons. Any number compared to positive infinity (other than itself) *will* be less than it.

Alex.

Having played in the group Aleph Null for some years (cdbaby) I can't resist jumping into this one:

less serious:
if x > infinity
  throw a_tantrum
then

more serious:
The new constant of infinity fits nicely into the IEEE FP space, so it will function here as aleph one, but I think LiveCode will internally cast an integer comparison, so it should also function as aleph null.

--
 Mark Wieder
 ahsoftw...@gmail.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to