Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,248 of 2,978    |
|    Femme Verbeek to yaniv.dg@gmail.com    |
|    Re: sorting stack data with pop and push    |
|    24 Aug 06 12:18:02    |
      From: fv@nospam.tcenl.com              yaniv.dg@gmail.com schreef:       > hi all,       > i'm trying to sort data in a stack,       > i have an option to use 2 more stacks,       > what is the way to sort the data with it?       >       There is no such thing as a stack kind of variabele in TP/BP.              The stack segment is a maximum of 64 kB of memory used for storing local       and global variabeles. Above that is the heap, that is used for storing       dynamic variabeles.       so:        var mybuf:^array [1..1000] of integer;              stores just 4 bytes on the stack for the pointer.              begin        getmem(mybuf,1234);              allocates 1234 bytes on the heap which can store 617 integers.                     A nice way to sort data in TP/BP is to make use of the       Tsortedcollection. Read the build in help topic on the subject.                     -- Femme              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca