I never use passing params by reference. I have modified my script to use passing by reference and constants as Ali did.
constant kHDist = 100 // horizontal distance between points constant kVDist = 75 // vertical distance between points on mouseUp put the top of me into tTop put the left of me into tLeft locToSnap tTop, tLeft lock screen set the top of me to tTop set the left of me to tLeft unlock screen put the topLeft of me end mouseUp on mouseDown grab me end mouseDown on locToSnap @xTop, @xLeft put round(xTop / kVDist) * kVDist into xTop put round(xLeft /kHDist) * kHDist into xLeft end locToSnap -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Snapping-To-A-Grid-of-TopLefts-tp4684742p4684746.html Sent from the Revolution - User mailing list archive at Nabble.com. _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode