In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Yep, That is exactly right. sensorPlus1(0) is the same variable as sensor(1) sensorPlus1(1) is the same variable as sensor(2) and so on... If you want to keep your "where from" array in step with the sensor array, just swap the elements in your swap routine. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=174704#m174790 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)