Last edited by technomania3000; Jan 20th, 2013 at 02:56 PM. Reason: Deleted
I'm not sure if I'm missing something but I don't think that'll work. Your loop's exit condition is based on Midpoint but you haven't maintained that within the loop so it will never exist. In fact it will simply keep iterating until EndPoint drops off the beginning of the index or StartPoint drops off the end, at which point you'll get an error.
I'm also not aure what you're trying to do. Are you just swapping the order of your array? In which case it's not doing that either. It will bubble the bottom element to the top and the top to the bottom but the intermediate elements won't actually move. They'll temporarily shift one place toward their nearest boundary as the original boundary element passes them but they'll get shifted back again when the other other original boundary element goes past in the other direction.
Am I missunderstanding what you're doing here?
edit>Also, I don't understand what you're doing to set the midpoint in the first place. If you're looking for the median element in teh array you want (StartPoint+EndPoint)/2 (and then accomodate the fact that there be an even number of elements so no single median element) rather than StartPoint-EndPoint*2. Using your formula will result in a positive int when called from AllDescending and a negative when called from AllAscending. So given your Loops exit criteria this will do nothing when called from AllAscending and crash with an "Index out of Bounds" when called from AllDescending.
Last edited by FunkyDexter; Aug 30th, 2012 at 05:39 AM.
When one of my minions says, "Hey, he's just one guy, what can he do?" I say "This"... and shoot them.
The problem with putting your lair in a volcano is keeping your robot army from melting.
I know that the human being and the fish can coexist peacefully - George Bush
What does your source code really do, can it make coffee by itself and then all you do is just place in the cup, and then press a button???
I am just kidding, this source code really looks like VB.NET and then that is really cool. Because of the fact of the matter that many people like myself have stayed on the programming platform of the late 1990's. Which I am beginning to give up, right about now...
So then what I was trying to say here, in this post. What does your snippet of source code, really do???
I am very interested in that fact!!
I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
Main Page: Click Here | Blog Page: Click Here | Products Page: Click Here | News Page: Click Here | Horoscopes Page: Click Here | CodeBank Page: Coming Really Soon...
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
Even I must admit that the above creation of mine was a bad idea, which is why I deleted it.
Last edited by technomania3000; Jan 20th, 2013 at 02:57 PM.