HDTenEightyP/NetNews huggingface dataset:
From: greaham@a.cs.okstate.edu (GREAHAM DARIN DONA)
Subject: TV Help with ListViewers
Organization: Oklahoma State University, Computer Science, Stillwater
Date: Sat, 3 Oct 92 21:41:44 GMT


   Got a TV question for those that know:


    I have a program that within it's many parts contain a collection of 
six items.  All the items are collected and saved through the stream 
successfully.  Upon opening the file, the collection is restored correctly
also.


    Now the problem.  After loading the file, I want to put the contents
into a ListViewer (with both horizontal and vertical scrollbars) but can't
figure out how to do this.  A ListBox really won't do my any good since
the six items in the collection will most likely be longer horizontally
than the listbox will allow.

    The six items in question are strings and the collection is a normal
collection for now.  I've got the ListViewer inserted into a dialog box
with both scrollbars present, the only problem I have is getting the data
from the collection inserted in the ListViewer, and Borland's TV Guide 
doesn't do much for explaining how to manage this.


    Here is a quick pic of what I'm after:

 ------------------------------------------------------
 |                                                    |
 | =======================================            |
 | = item1,item2,item3,item4,item5,item6 =            |
 | = item1,item2,item3,item4,item5,item6 =            |
 | = "                                 " =            |

        etc...



   Any help or suggestion would be greatly appreciated!



      Thanx

           Darin D. Greaham
From: exuhag@exu.ericsson.se (James Hague)
Newsgroups: comp.lang.pascal
Subject: Re: Bubble Sort Routine
Date: 5 Oct 92 14:30:09 GMT
Reply-To: exuhag@exu.ericsson.se
Organization: Ericsson Network Systems, Richardson, TX
X-Disclaimer: This article was posted by a user at Ericsson in North America.
              The opinions expressed are strictly those of the user and
              not necessarily those of Ericsson.

Robert Horn writes:
>
>How difficult is it to code quicksort? Just look it up and copy it
>verbatum from nearly any book on data structures and algorithms. 
>There shouldn't be any great need for comments

Almost all algorithms books give quicksort in a form that cannot
simply be typed it and executed.  Either the language is not Pascal,
is pseudo-Pascal, or has various assumptions which may not apply to
your case (only sorts a certain type of array, etc.).  I wouldn't
reccommend trying to get such a subtle algorithm working without
a full understanding of it.  Just get one of the many sorting routines
available from various ftp sites or from a commercial package.

As for all the "don't use bubble sort you moron" comments, any decent
algorithms class should teach that various algorithms may be good in
certain situations and do poorly in others.  You cannot make
blanket statements.  Quicksort is fast, yes, but it is also trickier
than bubble sort or insertion sort.  And if you have only a small
number of things to sort (which is something that happens quite
often as part of other problems) then all sorts end up being about 
the same in terms of  performance.  Go with the simpler solution.
Bubble sort is also useful if you start with nearly sorted data (and
add a flag so sorting stops if no values were swapped on the previous 
pass).

And there are more concerns than algorithmic complexity (as stated
by O-notation).  Sometimes it is important to preserve order while
sorting.  If there are two items A1 and A2 with identical keys, and
A1 precedes A2 in the original list, it may be desirable to have this
also be true after sorting.  Not all algorithms will do this.

--
James Hague   
exuhag@exu.ericsson.se
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Turbo Pascal 7.0
Organization: Queen's University
Date: Wed, 30 Sep 1992 00:35:47 GMT

In article <1992Sep28.130713.164681@dstos3.dsto.gov.au> cej@dstos3.dsto.gov.au writes:
>This could possibly be optional- you mainly want the
>capability when you've spent hours without a compile and you want to go thru &
>weed out a lot of bugs. Ask your self if 20 compiles with 1 error found is
>faster than 1 compile with 20 errors found (assuming it is handled with a
>message window as in BC)! For short editing periods, I agree that 1 error at a
>time is better.

Wouldn't an easier solution be to avoid long times without compiles?  If 
you're using a reasonable editor (the IDE if you can stand it, or one with a 
one-keystroke hook to TPC) then there's really no reason not to compile 
every time you want to take a 5 second break from typing.  
The first time through, you're likely to always get an error at the bottom 
with an "undefined forward" or an "unexpected eof", but those can be 
ignored.  If you get something else from a typo, it sure is easier to 
correct 5 minutes after you made it (yes, I'm advocating compiling 
every 5 minutes!) than it is several hours later, when you may have to go 
back through your notes to figure out what you meant.

That's one of the big advantages of TP over slower compilers.  You can use 
it a lot more often.

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: Berend.de.Boer@p23.f112.n100.z60.wlink.nl (Berend de Boer)
Newsgroups: comp.lang.pascal
Subject: Turbo Pascal 7.0
Date: 2 Oct 92 11:08:08 GMT

Alf Christophersen wrote in a message to All:

 AC> What I would like to see in a new TP, is the Simula notion
 AC> of assigning values to a variable.

 AC> a :- b means that you assign the pointer of a to point to b,
 AC> but
 AC> a := b, means that you copy the info in the fields of b to
 AC> the variable a, without moving the pointer.

You can write a := @b

Greetings, ...... === Ent ===
From: rind@binoc.bih.harvard.edu (David Rind)
Newsgroups: comp.lang.pascal
Subject: Re: Bubble Sort Routine
Date: 5 Oct 92 21:02:57 GMT
Organization: Beth Israel Hospital, Harvard Medical School, Boston Mass., USA

I saw an article somewhere not long ago that described a modified
bubble sort where the elements that were being compared varied with 
each pass according to some simple algorithm.  For instance, on the
first pass, the sort would compare elements 1 and 10, 2 and 11, etc.
while on another pass it might compare 1 and 5, 2 and 7, etc.  They
ran comparisons against other sorts, and it seemed very fast for a
bubble algorithm.  Anyone know anything about this?  Is this a
well-described sort?

-- 
David Rind
rind@binoc.bih.harvard.edu
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Turbo Pascal 7.0
Organization: Queen's University
Distribution: comp.lang.pascal
Date: Tue, 29 Sep 1992 13:52:04 GMT

In article <Bv5ss5.7Kx@mentor.cc.purdue.edu> pf@bilbo.bio.purdue.edu (Paul Furbacher) writes:

>Now, to add more depth to our discussion of multiple inheritance,
>operator overloading, I'll add templates.  Would a feature such as
>templates improve your work in OO-TP? (Sorry if this seems too much 
>like "c-ness envy".)  Are there other features of OO-programming 
>which we've left out of the discussion?

I've got a vague idea of what templates are, but I don't know the details.  
Could you describe, in Pascal or TP terms, what you think they should look 
like and act like in TP?  

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal,alt.msdos.programmer,comp.os.msdos.programmer
From: jt@fuw.edu.pl (Jerzy Tarasiuk)
Subject: Re: Hi() and Lo() functions?
Organization: Warsaw University Physics Dept.
	<1992Sep30.071546.20677@afterlife.ncsc.mil>
	<1992Oct02.130833.15481@eve.wright.edu>
Date: Mon, 5 Oct 1992 16:43:11 GMT

>>>>> On 2 Oct 92 12:07:59 EST, jblackwe@eve.wright.edu (John Blackwell) said:
John> In article <1992Sep30.071546.20677@afterlife.ncsc.mil> hcbarth@afterlife.ncsc.mil (Bart Bartholomew) writes:
>	AAAArrrrrgh.  Don't use divides, or mods to get
>power-of-2 remainders.  I don't know if it's PC in new
>computerspeak, but a shift operator is much faster than
John> I believe that the optimizer in Turbo Pascal 5.0+ replaces a divide or
John> multiply by a power of 2 with a shift instruction at the bit level.  It

Unfortunately, it doesn't. In Turbo Pascal 6 it does (2 * 1-bit SHR
if divide by 4, SHR by CL bits if divide by 2^n, where n>2).
But just in TP it doesn't matter, compiler understands Hi() and Lo().
From: soi@utrade.e-burg.su (Oleg I. Subachev)
Newsgroups: comp.lang.pascal
Subject: How can I determine that object is initialized already ???
Date: 29 Sep 92 14:09:29 GMT
Reply-To: soi@utrade.e-burg.su
Organization: Ural's Trade House

Dear Sirs !!!

I have Done method in my exit procedure.
But Run-time error 213 occurs if object is not initialized.

How can I determine that object is or not initialized ?

Thanks in advance,
Oleg Subachev
Newsgroups: comp.lang.pascal
From: rice@cray.com (Jonathan Rice)
Subject: Re: TP6/TPW TBufStream problem
Summary: more TP7 wishes
Organization: Cray Research, Inc.
Date: 28 Sep 92 14:05:38 CDT

In article <dmurdoch.179.717368697@mast.queensu.ca> dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:
>
>"With" is a mixed blessing sometimes, isn't it?  An option that would be
>really nice in the IDE is to have it able to display your code with all
>identifiers fully qualified.  

Yes...and as long as we're postulating color syntax highlighting, let's have
identifiers that are qualified by a preceding WITH stand out in a different
color (so you know there's more than meets the eye).

In article <10428@vice.ICO.TEK.COM> bobb@vice.ICO.TEK.COM (Robert Beauchaine) writes:
>  It would also be nice if the debugger had access to this
>  information, so it was smart enough to add a with'd variable to a
>  watch/evaluate expression without requiring you to fully qualify
>  that variable.

Hear, hear!  Another gripe along these lines: if one is dealing with
dynamically allocated arrays using this scheme:

  type
    dynamic = 1 .. 1;
    dynarray = ARRAY[dynamic] OF basetype;
  var
    myarray: ^dynarray;
  ...
  getmem(myarray, size_needed_expression);

  {$R-}
  something := myarray^[123];
  {$R+}

it would be nice of TD to permit watching/evaluating the array expression.
At present, it disregards the range checking option and says the subscript is
out of bounds.  Nice to know, but show me anyway.

Sorry to keep this thread wandering farther from its original topic...

-- 
Jonathan C. Rice  |   rice@zizania.cray.com  |  ...uunet!cray!rice
Newsgroups: comp.lang.pascal
From: jeroenp@rulfc1.LeidenUniv.nl (Jeroen W. Pluimers)
Subject: Re: Turbo Pascal 7.0
Organization: Dept. FMC, Gorlaeus Labs, Leiden University, The Netherlands
Date: Sat, 26 Sep 92 07:07:31 GMT

In article <10425@vice.ICO.TEK.COM> bobb@vice.ICO.TEK.COM (Robert Beauchaine) writes:
>
>  In C++, your constructors/destructors *have* to be named the same
>  as your base class; i.e., for a class name "a", your constructor
>  would be "void a(optional arguments)", and your destructor would be 
>  "void ~a(optional arguments)".  If your descended class wishes to 
>  call either, there is no ambiguity.
>
Doesnt' this naming convention give problems when you want to give
one class more than one constructor or destructor?

(For instance in the case of streams. All objects in TP have a special
constructor called LOAD for that).

--
    o _   _  _   _   _             voice: +31-2522-20908 (19:00-24:00 UTC)
   / (_' |  (_) (_' | |            snail: P.S.O.
__/                                       attn. Jeroen W. Pluimers
                                          P.O. Box 266
jeroenp@rulfc1.LeidenUniv.nl              2170 AG Sassenheim
jeroen_pluimers@f256.n281.z2.fidonet.org  The Netherlands
From: roth@oasys.dt.navy.mil (Pete Roth)
Newsgroups: comp.lang.pascal
Subject: Re: One problem with TV
Date: 1 Oct 92 12:15:22 GMT
Reply-To: roth@oasys.dt.navy.mil (Pete Roth)
Organization: The David Taylor Model Basin

In comp.lang.pascal, LOPEZJ@EVALUN11.BITNET writes:
[...]
>                             But when I write in this file, the strings are
>shown in the screen, crashing the background, and not in this file. The
>procedures that work with this file are not writing in OOP. These are
>writing in standard Pascal.

By now, you've probably figured out that you need to
	Write( f, astring )
rather than
	Write( astring )

or, if you're doing something like
	Assign( f, '' )
somewhere in your code, that'll kill TV, too.

regards, pete
- - - - - - - - - - - - - - - - - - - - - - - - - -
Peter N Roth      roth@oasys.dt.navy.mil
You can take a horse to water, but a pencil must be lead.
Newsgroups: comp.lang.pascal
From: runefr@ifi.uio.no (Rune Fr|ysa)
Subject: Using interrupt 13h(?) to acces disk at low-level
Organization: Dept. of Informatics, University of Oslo, Norway
Date: Fri, 2 Oct 1992 21:59:24 GMT
Originator: runefr@hnoss.ifi.uio.no


with Pascal, I'm interested in a solution in any language
expect basic.

My problem: I've got a handful of disks written with both 
amiga and ZX-Spectrum, and I'm trying to read them at low-level.
The problem, however is that no mather what I set in the table
specifying gap between sectors, etc. I keep getting these
sector not found error messages.

I have however been enable to format and read disks at 880k, 
but not the Amiga disk.

Has anyone got a clue, eventually a list of the parameters that
should be passed to the floppy-disk controller.

(And is there a newsgroup handling such questions?)

---------===============================================--------------
Rune Froysa,                 |"Sience is the attempt to make the 
Dept. of Informatics         | caotic diversity of our sence experience
University of Oslo, Norway   | correspond to a logically uniform system 
E-mail:runefr@ifi.uio.no     | of thought" - Albert Einstein.



Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Lost mail
Organization: Queen's University
Date: Tue, 29 Sep 1992 13:45:57 GMT

If anyone has posted a message here to me since last Friday, I probably 
missed it.  The company that was providing the phone lines for the Ontario 
computer network went into receivership, and news is only now becoming 
available as alternate arrangements are being made.


Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: "andrew makiejewski" <andrew.makiejewski@canrem.com>
Subject: fs:pascal
Reply-To: "andrew makiejewski" <andrew.makiejewski@canrem.com>
Organization: Canada Remote Systems
Distribution: comp
Date: 26 Sep 92 01:49:43 EST


I just saw an advert in PC Techniques for Frontier Software Development
Corp's FS:PASCAL. I just saw a message in this message area referring
to it a bit. Has anyone out there used the compiler. It would be nice
to to produce 32 code. Now if we could only get an OS/2 version.

Andrew.                      Andrew.Makiejewski@canrem.uucp 
Entered Sep 26,92 at 00:26:58 on CRS from Toronto, Ontario, Canada.
---
  PMDBM  V1.75 #33 
--
Canada Remote Systems  - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
Newsgroups: comp.lang.pascal
From: delozier@Condor.mcs.kent.edu (Greg Delozier)
Subject: Re: size of 2-d array in pascal
Organization: Kent State University
Date: Mon, 28 Sep 1992 04:06:54 GMT

In article <1992Sep27.061745.24263@nmsu.edu> ahall@nmsu.edu (HALL) writes:
>Sanjay Gupta (sxg27@po.CWRU.Edu) wrote:
>: 
>: hi
>: 	Can somebody tell me how can i create large arrays like
>: 200x200 or bigger in pascal. I am working with tp5.0 version. I
>: need these arrays to work guass elimination algorithm.
>:         thanks in advance
>: 					sanjay gupta
>
>Sanjay,
>     The thing to do is to factor the matrix into two matrices, a lower
>triangular and a upper triangular.  For example:
>   A = LU
>     This process is too dificult to explain here.  I would suggest looking
>in a Numerical Analysis textbook.  In each of the resultant matrices, half
>of the values are zeros, and therefore don't need to be saved.  This should
>get you rolling in the right direction.
>A. Hall
>

I don't know if this matters or not, but all the won't any obvious LU 
factorization algorithm still need space to store and manipulate A? And
I find storing triangular matrices in rectangular spaces to be more
of a pain than it's worth. I think the recommendations (I assume in the FAQ)
about pointers to row arrays will probably be easier to implement, though
200x200x4 = 40000x4 = 160k (more or less) means not a lot of these will
fit in memory, either!

Finally, if Sanjay is trying to solve simultaneous linear equations of 
200x200 by gauss-jordan elimination, I think the results might be 
sufficiently skewed by round off errors at pivot points as to render the
answer of dubious value. I don't claim to be an expert on this by any 
means, but I have found other methods to be m numerically accurate.
The book Numerical Recipes (the Pascal version, I suppose would be best :-)
has a reasonable entry-level discussion to this topic, and presents
a singular value decomposition routine that has been workable for
large matrices in my applications.

I'd be happy to send Sanjay my port of the SVD algorithm to Pascal (i.e.
the book's algorithm, not the book's code...) if that would be useful,
but without the book, it would be difficult to make good use of it.

-greg

Greg DeLozier/Senior Analyst, Loral Defense/Graduate Student, Kent State

Newsgroups: comp.lang.pascal
From: buhr@daimi.aau.dk (Morten Buhr)
Subject: Re: Bubble Sort Routine
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
Date: Tue, 29 Sep 92 07:36:02 GMT

Dennis.Ayala@f23.n367.z1.FIDONET.ORG (Dennis Ayala) writes:

>Hello All:

>  If it is possible that somebody would be kind enough to post a pretty good 
>bubble sort routine I will appreciate it. I kinda need one.
 ~~~~~~~~~~
 You must be kidding. You really don't want to use a Bubble-sort routine in
 your programs, since it's probably the slowest sort-algorithm in the world.
 Use Quick-sort as anyone else, or if you don't like the complexity of that
 algorithm, you probably want to get your hands on a variant of Bubble-sort
 called Comb-sort, which is considerly faster than Bubble-sort.

>Greetings,

>Dennis Ayala


>--  
>Internet: Dennis.Ayala@f23.n367.z1.FIDONET.ORG
>UUCP: ...!myrddin!tct!psycho!367!23!Dennis.Ayala
>Note:psycho is a free gateway between Usenet & Fidonet. For info write to
>     root@psycho.fidonet.org.
-- 
Morten Buhr / e-mail buhr@daimi.aau.dk
Computer Science Department 
Aarhus University
Denmark
Newsgroups: comp.lang.pascal
From: jim@sciborg.uwaterloo.ca (Jim Tremain)
Subject: Re: Turbo Pascal 7.0
Organization: University of Waterloo
Date: Thu, 1 Oct 1992 17:53:56 GMT

I want to add Long Strings to the list of things to add to Turbo Pascal 7.0.
254 characters is too few for many of the little utilites I write to
manipulate text files.  Having to use arrays means I have to write all of
my own LENGTH, POS .... functions.  This should be built in!!!

Jim Tremain
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Converting TP6.0 .EXE files to .COM
Organization: Queen's University
Date: Fri, 2 Oct 1992 12:18:32 GMT

In article <BvEyG3.9vn@cpsc.ucalgary.ca> shivji@cpsc.ucalgary.ca (Zein Shivji) writes:
>      I was wondering how to convert an .exe file made with Turbo
>      Pascal 6.0 into a .com file.  Dos 5.0's  EXE2BIN command
>      doesn't work, it just says that the file cannot be converted
>      or something to that effect.
>
>      Sorry if this is a FAQ or this isn't the appropriate group.
>      Thx.

TP 6 .EXE files need segment fixups when they get loaded; that means they
can't be changed to .COM format without extensive editing.  If all you're 
after is coming earlier in DOS's search list, just rename the .EXE to have a 
.COM extension; it'll still run fine, but will be selected before a 
like-named .EXE file.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: kanakis@hsi.com (Tony Kanakis)
Subject: Needed: Case in-sensitive packed array of char sort routine
Organization: 3M Health Information Systems, Wallingford, CT.
Date: Fri, 2 Oct 1992 19:38:11 GMT


I'm using standard Berkley unix Pascal and have no 'upcase' function.
I can't seem to get my buble sort to work on on a packed array of char.
The declaration is 'datatype = array [1..100, 1..80] of char'.

This sort only looks at the first letter in the string and I need one that will
look at the whole string.

The sort is as follows:

(******************************************************************************)
procedure SortData ( var data : datatype );

        {  Given:       Array                                           }
        {  Task:        Output array elements lowest to highest         }
        {  Return:      Output array elements lowest to highest         }

  var
        MinPosition,                    { Pointer for sort array }
        B,
        Q,
        idx,                             { Index for nested -for- loop }
        cnt
        : integer;
        Temp                    { Temporary place holder for sort routine }
        : smalltype;

  begin
        cnt := 1;
        for idx := 1 to W-1 do    { Number of passes }
                begin
                        MinPosition := idx;     { Assume idx is smallest }

                        { Test previous smallest }
                        for Q := idx + 1 to W do
                                if ((data[Q][cnt]) < (data[MinPosition][cnt]))
                                        then MinPosition := Q;
                        { Now swap smallest outside inner loop }
                        for B := 1 to 80 do
                        Temp[1][B] := data[idx][B];
                        for B := 1 to 80 do
                        data[idx][B] := data[MinPosition][B];
                        for B := 1 to 80 do
                        data[MinPosition][B] := Temp[1][B]
                end;    { of sort array }

  end;
(******************************************************************************)

 Thanks in advance,

-- 
======= Tony Kanakis                        {uunet,yale}!hsi!kanakis =======
======= 3M Health Information Systems                kanakis@hsi.com =======
======= Wallingford, Connecticut  06492                 203 949-6355 =======

Newsgroups: comp.lang.pascal
From: achobbs@eos.ncsu.edu (ASHTON CALDWELL HOBBS)
Subject: Pascal PD for Sale
Originator: achobbs@c00061-100lez.eos.ncsu.edu
Reply-To: achobbs@eos.ncsu.edu (ASHTON CALDWELL HOBBS)
Organization: North Carolina State University, Project Eos
Date: Tue, 29 Sep 1992 19:33:28 GMT


Over 190 Files comprising about 7MB of compressed files on 6 3 1/2HD disks for only
$15.00 (Free Shipping.)  Includes source, help files, routines, and over 100
math calculations in Pascal.  Also includes Squish.  A PD Hard drive compression
program.
Ashton Hobbs
PO Box 22436
804A Metcalf
NC STate
Raleigh, NC 27607
Newsgroups: comp.lang.pascal
From: shadow@r-node.gts.org (Jay Chu)
Subject: Re: Telegard 2.7 BBS programming
Organization: R-node Public Access UNIX Information System (416-249-5366)
Date: Tue, 29 Sep 1992 21:36:06 GMT

In article <69122@hydra.gatech.EDU> gt7803b@prism.gatech.EDU (Raving Mad Lunatic) writes:
>>Can someone write me a TG27 program for altering flags globally in the entire
>>user.lst?
>
>BTW: I'm working on a TG work-alike (as opposed to hacks like RG) that
>hopefully will displace a few more... As for altering flags, that's fairly
>easy, but I don't have anything to do it.

How easy?  Can you show me how easy in an example?

> Try your local Beta site.

No such thing in Toronto.

>-- 
>Child-molesting is an art, not a science...
-- 
        ______                shadow@r-node.gts.org
       | |__| |   If it's there and you can see it       - it's real
       |  ()  |   If it's there and you can't see it     - it's transparent
       |______|   If it's not there and you can't see it - you erased it!
Newsgroups: comp.lang.pascal