What is a real?

Mark Waddingham mark at livecode.com
Sat Apr 25 13:13:50 EDT 2020


The ‘is strictly’ operators allow you to detect what the actual internal storage type of a value is. Some things generate numbers which are stored as int32s but most will store them as doubles - arithmetic operators included.

I don’t know what the docs say about ‘is strictly an integer’ but the operators themselves are definitely doing as they should so the docs might need some refinement :)

Mark

P.S. The ‘is strictly’ operators were not really added for general use as they are tied to internal mechanisms. They were added to help with doing faithful export of values (lcVCS way back IIRC).

Sent from my iPhone

> On 25 Apr 2020, at 17:44, Brian Milby via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> In your initial example, they are all strings.  1.1+0 would be strictly a real.  What is troubling is that I’m seeing that 1+200 is not strictly an integer yet the docs say it should be.
> 
> Thanks,
> Brian
>> On Apr 25, 2020, 12:06 PM -0400, Mark Wieder via use-livecode <use-livecode at lists.runrev.com>, wrote:
>>> On 4/25/20 7:40 AM, Bob Sneidar via use-livecode wrote:
>>> Apparently nothing is a real. Neither is anything strictly a real.
>>> 
>>> put 1 is strictly a real — false
>>> put 1.1 is strictly a real — false
>>> put 1.1 is a real — compilation error
>> 
>> If it helps any (hint: it doesn't) it's the currency of Brazil.
>> You're welcome.
>> 
>> --
>> Mark Wieder
>> ahsoftware at gmail.com
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list