Sorting data alphabetically

videoninjavideoninja Junior MemberPosts: 29
Hi All,

Just curious how you all might approach sorting data alphabetically.

Imagine a simple structure:

define_type
structure my_small_database
{
integer record_id
char name[42]
}
define_variable
my_small_database db[10]

assume the following:

db[1].name = "'Starbuck'"
db[2].name = "'Apollo'"
db[3].name = "'Colonel Tigh'"
db[4].name = "'Commander Adama'"
db[5].name = "'Baltar'"
db[6].name = "'Number 6'"
db[7].name = "'Boomer'"
db[8].name = "'Dualla'"
db[9].name = "'Tyrol'"
db[10].name = "'Athena'"

With this data, how would you go about sorting it alphabetically?

Comments

  • Joe HebertJoe Hebert Junior Member Posts: 2,154
    Bubble, Shell, and Quick

    There are a few sorting routines covered in this Tips and Tricks thead:

    http://www.amxforums.com/showthread.php?t=1216
  • videoninjavideoninja Junior Member Posts: 29
    Fantastic Joe. Thanks for the tip.
  • viningvining X Member Posts: 4,353
    Oringinally posted by Marc Scheibein:
    Quote:
    - Added support for list box buttons, list tables, and
    marquee-text features*

    * As of this release (2.7), these features are supported on
    the R-4 device only

    .....

    - This TPDesign4 release adds support for list box buttons
    as well as marquee text and the new page-flip "forget"
    acction for use with the R-4 remote device. The R-4
    device does support these new features.
    However, these features are also available for the other
    existing panel types, but are as yet not supported in the
    existing firmware of those devices.

    The list box features that are currently supported in the R4 & DMS list boxes also support a variety of text searches similar to a what can be done w/ MySQL database manipulation. The question is when will the firmware on the TPs be updated to take advantage of these features as well?
  • viningvining X Member Posts: 4,353
    I just went through the manual for the new MVP-8400i panel looking for the list box commands, assuming these newer panels would have support for the list box, tables and search functions but could not find and references to it any where. Can it be that the list box capabilites are still limited to the R-4 remotes & DMS keypads?
  • dthorsondthorson Junior Member Posts: 103
    I was told AMX would come out with a firmware upgrade for other panel to support the listbox.

    I got excited when I first learned of this control, then was dissapointed when I learned it was limited to certain panels.
  • GSLogicGSLogic Original Member Posts: 562
    dthorson wrote:
    I was told AMX would come out with a firmware upgrade for other panel to support the listbox.

    I got excited when I first learned of this control, then was dissapointed when I learned it was limited to certain panels.
    I was told that the listbox will be supported on all Modedo panels, when... is another thing.
Sign In or Register to comment.