I need a function like: Wrap(number, lowerbound, upperbound)
such that Wrap(5,1, 3) will return 2. In other words, it "wraps" the number around the supplied bounds and returns where it "lands". I believe it would work similarly to assigning a value to a datatype outside its scope, like assigning 300 to a Byte type. I looked up some solutions online and none of them really seemed to work properly and their comments were surrounded by debate. Is there an efficient way to do this, and does anyone think it would be a useful function to add to Gambas itself? -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271 ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user