Small and strange problem

Paul Hibbert paul at livecode.org
Sun May 10 13:10:14 EDT 2020


No replies so far, so I had a few minutes spare and tried to recreate this problem, but couldn’t. No matter what I put into tMins first, even an empty variable still returned 0, so my suggestion would be to wrap the script in a try - catch to see what’s going on with the left operand (tMins) during the equation, something like:

   try
      put (tMins/60) into tMins
   catch tError
      if tError then answer "An Error Occurred;"  && tError & return & "tMins =" && tMins
   end try

I tried in both versions of LC that you mentioned and saw no problem. 

Maybe somebody else will have a better idea.

Paul

> On May 9, 2020, at 07:05, Graham Samuel via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> I’m using LC 9.6.0 dp4 and 9.5.1 - this issue is seen in both versions.
> 
> I have a script with a very simple statement:
>  put (tMins/60) into tMins
> 
> tMins contains a number, and as expected I get a numeric result, for example if tMins is 31, I get 0.516667
> 
> but ONLY when I step through the script in the IDE. If I let the script run, the IDE reports an error:
> 
>> Execution error (operators /: error in left operand, char 1
> 
> 
> Either there’s an error or there isn’t. What can be wrong? I suppose as usual it’s me, but I am foxed.
> 
> Graham
> _______________________________________________
> 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