Sorting data alphabetically
videoninja
Junior Member
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?
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
-
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 -
Fantastic Joe. Thanks for the tip.
-
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? -
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?
-
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.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.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
