Re: Swap and Compare functions


[ Follow Ups ] [ Post Followup ] [ CS2604 Discussion WWWBoard ] [ FAQ ]

Posted by study break on August 02, 1999 at 10:13:58:

In Reply to: Re: Swap and Compare functions posted by hussein on August 02, 1999 at 08:14:49:

: : In the project specification it says we must make functions to make comparisons and swaps. I wrote a swap function, but I used a counter to be incremented before comparisons. Is this OK?

: personally, i dont particularly care, but if the specification says you should write a function, u should probably write a function ...

You are eventually going to have to swap the values, how are you going to change the array around if you are just making comparisons? I think that sentence in the specifications was poorly worded... It's pointless to write a function that does the comparisions and another to do the swaps (which will need the comparisons anyway).




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2604 Discussion WWWBoard ] [ FAQ ]