Alphabetize List
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-14 03:27 PM
‎2007-02-14
03:27 PM
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-14 04:13 PM
‎2007-02-14
04:13 PM
One of the basic programming issues.
Are you looking for an algorithm or a ready to use script? Best should be bubble sort, I guess.
Comparing two strings can be done by < or >
From brain to keyboard:

Comparing two strings can be done by < or >
From brain to keyboard:
dim t[], s[] ! ### set source t[1]="one " t[2]="two " t[3]="three " t[4]="four " ! ### preset destination FOR i=1 TO VARDIM1(t) s="" NEXT i ! ### sort FOR i=1 TO VARDIM1(t) p=i FOR j=1 TO i-1 IF s>t THEN ! insert element FOR k=i TO j+1 STEP -1 s =s[k-1] NEXT k p=j : j=VARDIM1(s) ENDIF NEXT j s =t NEXT i ! ### output PRINT s, "/", VARDIM1(s)
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-15 12:46 AM
‎2007-02-15
12:46 AM
Viel Dank, Frank. I'll give it a go.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-17 07:45 PM
‎2007-02-17
07:45 PM
Danke sehr mein Freund. I have been meaning to figure something like this out for some time. I hadn't expected the code to be so short. I look forward to trying it out.