Cubist's first bug report
dsc at swcp.com
Sun Jun 5 20:55:19 CEST 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.
> 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; put 0 into s; put 0 into s
> repeat 10000
> add 1 to s[random(3)]
> put cr & s &c& s &c& s after s0
> end repeat
> put the millisecs - m1 &cr& \
> s+s+s &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:
More information about the use-livecode