Small and strange problem

Graham Samuel livfoss at mac.com
Mon May 11 13:18:32 EDT 2020


I set this hare running initially. I really do think there is a bug, because the thing works when stepped through but not if it’s allowed to run without interruption. In the stepped-through activity it’s easy to see that tMins does have a value. In my example it’s 31, or maybe it’s a string of which the visible part is “31”. But the fact remains the script behaves in two different ways, at least on my computer.

As I tiny bit of background, the script tries to parse a string that represents a longitude, copied from a web site. It certainly has some weird characters in it, but I thought I’d got round then. FWIW, the string is 

004° 31′ 50″ W

I am going to report it to the mother ship

Graham

> On 11 May 2020, at 16:31, Rick Harrison via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi Andy,
> 
> Yes, tMins has to have a value or the statement makes no sense because LC has no
> context for what you are trying to do.  LC doesn’t know if tMins is a string or something else.
> 
> Rick
> 
> 
>> On May 11, 2020, at 4:24 AM, AndyP via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> I seem to have my posts dropped at the moment hence this,
>> 
>> I'm seeing the same error
>> 
>> with 
>> 
>> on mouseUp pMouseButton
>> put (tMins/60) into tMins
>> answer tMins
>> end mouseUp
>> 
>> button "Button": execution error at line 2 (Operators /: error in left operand), char 1
>> 
>> Interestingly this
>> 
>> on mouseUp pMouseButton
>> try
>>   put (tMins/60) into tMins
>> catch tError
>>   if tError then answer "An Error Occurred;"  && tError & return & "tMins =" && tMins
>> end try
>> end mouseUp
>> 
>> does NOT through an error or a catch error message
>> 
>> 
>> If however tMins is initialized then all works as expected
>> 
>> on mouseUp pMouseButton
>> put 20 into tMins
>> put (tMins/60) into tMins
>> answer tMins
>> end mouseUp
>> 
>> ???
>> 
>> 
>> _____________________________________
>> Sent from http://runtime-revolution.278305.n4.nabble.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