Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Powerbasic > Re: C to PB hel...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 12 Topic 257 of 276
Post > Topic >>

Re: C to PB help.

by "Michael Mattias" <mmattias@[EMAIL PROTECTED] > Oct 26, 2007 at 02:31 PM

"Anonymous" <r1a@[EMAIL PROTECTED]
> wrote in message 
news:DomUi.1524$Qr.74@[EMAIL PROTECTED]
> How can ARRAY SORT sort from 2,10,12,7,5,8,1,3,5 to12,10,8, 7,5,2,1,3,5?

> As you can see the table isn't sorted; neither in ascending nor
descending 
> order. At least not the whole part of it.It would be very hard for ARRAY

> SORT to find which item in the table should be moved; in accordance with

> how a heap data structure should be organized.
>
> Secondly I'm currently studying Algorithms and Datastructures at the 
> moment, and this code is about the heap structures, as you probably 
> spotted.
> PB is just a tool in this study, not the target.

Well, it looked like some kind of sort. (I am not a C programmer).

> I don't think ARRAY SORT would be just as efficient here.Direct memory 
> manipulation, as in the C code, would be much more preferable.
> --

You don't think ARRAY SORT would be as efficient as direct memory 
manipulation?  Um, what do you think the compiler does when your source
code 
reads "ARRAY SORT ..??"  (Hint: the initials are "direct memory 
manipulation").

Then again, using ARRAY SORT doesn't really teach you much about
structures 
and memory management. Of course, that's why people actually purchase 
licenses for high-level language products, so they don't have to do all
that 
dirty work themselves.

MCM
 




 12 Posts in Topic:
C to PB help.
"Anonymous" <  2007-10-26 08:38:38 
Re: C to PB help.
"Anonymous" <  2007-10-26 08:51:04 
Re: C to PB help.
"Judson McClendon&qu  2007-10-26 05:55:14 
Re: C to PB help.
"Judson McClendon&qu  2007-10-26 07:30:06 
Re: C to PB help.
"Anonymous" <  2007-10-26 14:58:23 
Re: C to PB help.
"Anonymous" <  2007-10-26 15:11:03 
Re: C to PB help.
"Michael Mattias&quo  2007-10-26 13:33:24 
Re: C to PB help.
"Anonymous" <  2007-10-26 15:58:19 
Re: C to PB help.
"Michael Mattias&quo  2007-10-26 14:31:46 
Re: C to PB help.
"Judson McClendon&qu  2007-10-26 15:39:29 
Re: C to PB help.
"Judson McClendon&qu  2007-10-26 09:43:04 
Re: C to PB help.
"Olav Bergesen"  2007-11-12 19:57:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 15:25:13 CDT 2008.