Cubist's first bug report

Dar Scott dsc at swcp.com
Sun Jun 5 14:55:19 EDT 2016


Very good test!

I mentioned in crossed email that I suspect reevaluation.  Since the problem shows up with item and not array subscripts, I would suspect the reevaluation is done to avoid some problem.  Even so, the item number should be computed once and saved even if the character location in the string is recomputed.  

Dar


> On Jun 5, 2016, at 11:47 AM, [-hh] <hh at hh.on-rev.com> wrote:
> 
> What's the culprit for that? I dare say:
> 
> = It's not the random (as Mark S. proved with his example)
> = It's not a random-incompatible "add" (see example below)
> 
> It is the basic problem that LC has with counting items,
> lines, words or other chunks. The number of <chunks> is
> defined in a logically inconsistent way.
> 
> Example that works correctly:
> 
> local f="OUT", c=","
> on mouseUp
>  lock screen; lock messages
>  put the millisecs into m1
>  put empty into fld f
>  put 0 into s[1]; put 0 into s[2]; put 0 into s[3]
>  repeat 10000
>    add 1 to s[random(3)]
>    put cr & s[1] &c& s[2] &c& s[3] after s0
>  end repeat 
>  put the millisecs - m1 &cr& \
>        s[1]+s[2]+s[3] &cr& s0 into fld f
>  unlock screen; unlock messages
> end mouseUp 
> 
> 
> 
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Cubist-s-first-bug-report-tp4705407p4705410.html
> Sent from the Revolution - User mailing list archive at 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





More information about the use-livecode mailing list