473,396 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sort Names!!

6
Hi, I have the following code to Sort entries

for i = 1 to 4

for j=1 to 4

if getname( i ) > getname( j+1 ) then

sort = getname( j+1 )

getname( j+1 ) = getname( i )

getname( i ) = sort

end if

next j

next i

please help find out why it's not working!

thanks
Feb 28 '08 #1
2 1066
debasisdas
8,127 Expert 4TB
Which entries ?
What are you sorting ?
Feb 28 '08 #2
Killer42
8,435 Expert 8TB
Try running the inner (j) loop backwards, from 4 to 1. Or similar (maybe 4 to 0, or 5 to 1 I'm not sure).
Feb 28 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mike Zupan | last post by:
I have a list that includes files and directories ie: list = I want to sort it so it looks like this I'm just wondering if there is an easy way to do this
6
by: Mayer | last post by:
Hello: Is there a way to see at the python prompt the names of all the public methods of a class or the names exported by a module? I know that GUI-based IDEs have a nifty way of displaying...
19
by: David | last post by:
Hi all, A while back I asked how to sort an array of strings which would have numerals and I wanted to put them in sequential numerical order. For example: myArray = "file1"; myArray =...
2
by: gonzo | last post by:
So I have a project where I'm supposed to have a .txt input file of no more than ten first names, last names and birth years, and than in a menu I'm to give the user some options as to how the...
4
by: rn5a | last post by:
Can the items in a ListBox be sorted by the name of the items? The ListBox actually lists all directories & files existing in a directory on the server. Note that all the directories should be...
10
by: Brion | last post by:
Is it possible to sort outer and inner strings at once? The sorted output should look like the following: <category>Bars</category> <name>Alpha Bar</name> <name>Beta Bar</name> ...
14
by: xtheendx | last post by:
I am writing a gradbook type program. It first allows the user to enter the number of students they want to enter. then allows them to enter the first name, last name, and grade of each student. The...
3
by: Brian Connelly | last post by:
Okay, I have two files one is the HTML where the user inputs a name, and clicks Add. The add button calls on a JavaScript Function created that is suppose to put sort the names. Adding One or more...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.