OptoBlog

OptoNews Tip: 4 subroutines for sorting tables

Posted by Jean Femia on Apr 27, 2016 4:58:10 PM

Sorting numbersThe OptoForum community scores again!

If you've ever needed to sort tables in PAC Control—string, float, or integer tables—here are 4 new helpful subroutines contributed by forum member Philip in Code Samples and Tips.

Philip developed these subs for faster table sorting using "an iterative implementation derived from Robert Sedgewick and Jon Bentley's 3-way partition quick-sort algorithm." And in addition to their speed, the subroutines have little impact on memory. 

The subs will work for PAC Control Basic R9.3 and higher.

Thanks, Philip!

Check out other samples or ask and answer questions on all kinds of Opto 22 products in the OptoForum.

See the Faster table sorting thread and download Philip's sample subs now.

Get sample subroutines

Topics: Tips, optonews, PACs, PAC Project, OptoNews 2016-04-27

Written by Jean Femia

Jean Femia writes about technical subjects and has focused on automation and control systems for more than 15 years. She likes learning about technology and taking corners in her Honda S2000.
Find me on:

    Subscribe to Email Updates

    Recent Posts

    Posts by Topic

    see all