HDTenEightyP/NetNews huggingface dataset:
From: friesenda@skyfox.usask.ca
Newsgroups: comp.lang.pascal
Subject: RE: Units using Units
Date: 7 Apr 92 19:41:19 GMT
Organization: University of Saskatchewan

In a previous article, J_SCHULL@acc.haverford.edu (Jonathan Schull) wrote:
> 
>(********************************
>      Several people suggested that I could have what I want
>      if MyProgram doesn't itself use anything in UnitDeep.
>      But either I'm confused, or our beliefs are wrong (or both!)
>      The compiler really doesn seem to need UNITDEEP.TPU no
>      matter what.
> 
>      To compile MyProgram, I seem to need UnitDeep no matter
>      where the "Uses UnitDeep" statement is put in UnitShallow. 
>      (I'm using DRDOS 6.0, but my collaborator has confirmed
>      this using MSDOS 5.0)
> 
>      Here's the scoop. ********************************)
> 
> 
>UNITDEEP.PAS:
>unit UnitDeep;
>interface
>implementation
>end.
> 
>UNITSHAL.PAS:
>unit UnitShallow;
>interface
>implementation
>uses unitDeep;
>end.
> 
>MYPROGRA.PAS:
>Uses UnitShallow;
>begin
>end.
> 
> 
>(********************************
>      OK, no problem.  But now....
>          ********************************)
> 
>C:\SL\TEST>del unitdeep.*
> 
I don't know why, but the compiler requires at least the .TPU file, 
so you can't get rid of it. What I think happens is this (I could
be wrong):

  - Compiler looks at MyProgram.Pas. It uses UnitShallow.
  - Compiler looks for UnitShallow.TPU. If it doesn't exist
    then it attempts to create it from UnitShallow.Pas.
  - UnitShallow uses UnitDeep. The compiler looks for UnitDeep.TPU
  - In the above case, since you deleted it, UnitDeep.TPU does
    not exist. If UnitDeep.Pas (which you also deleted) existed,
    a new UnitDeep.TPU would be created. Since it does not exist
    you get the following error:

>C:\SL\TEST>tpc myprogram
>Turbo Pascal Version 5.5  Copyright (c) 1983,89 Borland International
>MYPROGRAM.PAS(1): Error 15: File not found (UNITDEEP.TPU).
>Uses UnitShallow;
>                ^

The point is, you can probably delete the .PAS file, but you MUST
keep the .TPU (I have no idea why; I don't know enough about the
turbo compiler to say).

>UNITSHAL.PAS:
>unit UnitShallow;
>interface
>uses unitDeep; {USES STATEMENT MOVED INTO INTERFACE}
>implementation  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>end.
> 

I don't think its placement in the unit makes any difference.
The compiler will still check to see if the .TPU file exists.

>(********************************
>    So what's going on?  Why does the compiler need UNITDEEP.TPU?
>          ********************************)


Like I said, I don't know for sure. Perhaps someone else can
provide an explanation.  From the short time I've read this
group, Duncan seems to be the TP guru.

Why must your program compile without that .TPU file? If you don't
want people to have the source for it, don't include it; just give
them the .TPU.  As far as I know, there is no way to reverse
engineer it into Turbo code again.


----------
Darryl Friesen
friesenda@sask.usask.ca
Univ. of Saskatchewan, Canada
From: ttoyofuk@orion.oac.uci.edu (Tony Toyofuku)
Subject: What does text[$FFF] mean?
Newsgroups: comp.lang.pascal
Organization: University of California, Irvine
Date: 8 Apr 92 20:59:35 GMT

Hi,
You all have been so helpful in the past with my questions, I figured I'd
toss out an easy one.  I'm looking at this book Turbo Pascal Programmer's
Library, by Kris Jamsa (1987 ed.), and on page 276, there's a variable
thats like this:

	var
  	   InText	: text[$FFF];


What's the [$FFF] for?  I imagine that's something to do with setting some
size to FFF hex, but I don't know.  The reason I ask is that my compiler
TP 6.0 doesn't like that (is the $FFF for 3.0 only?).  What happens if I
leave the [$FFF] part out?  Any explanation will be greatly appreciated.

Tony

===============================================================================
Anthony Toyofuku			    Phone:	(714)856-8160
Main Library, Reference			    Internet: 	ttoyofuk@orion.uci.edu
University of California, Irvine	    Bitnet:	ttoyofuk@uci.bitnet
From: slr2l@cc.usu.edu
Newsgroups: comp.lang.pascal
Subject: Serial Port
Date: 11 Apr 92 13:18:43 GMT
Article-I.D.: cc.1992Apr11.071843.54389
Organization: Utah State University

I'm interested in writing some online programs for bulletin board systems,
although I'm having a rough time trying to figure out how to send the
data to com port 1.  Any ideas??  

  SLR2L@cc.usu.edu
From: caroe@iesd.auc.dk (Jesper Caroee)
Newsgroups: comp.lang.pascal
Subject: Re: Heap destroyer
Date: 10 Apr 92 12:28:28 GMT
Organization: Mathematics and Computer Science, Aalborg University


I seems to remember two procedures called

  Mark(p);

and

  Release(p);

that marks a position on the heap and releases it again, but I'm not sure.



--
Jesper

Q: Computing is just like sex because...?
A: When you make a mistake, you end up supporting it for years

,-----------------------------------------------------,
: Jesper Caroe                                        :
: University of Aalborg                               :
: caroe@iesd.auc.dk                                   :
'-----------------------------------------------------'
From: dtiberio@csws7.ic.sunysb.edu (David Tiberio)
Newsgroups: sbcs.cse114,comp.lang.pascal
Subject: Re: pascal trouble
Date: 12 Apr 92 02:41:03 GMT
Article-I.D.: sbcs.1992Apr12.024103.27635
Distribution: na
Organization: State University of New York at Stony Brook


	I have to do a database option where the user presses
RETURN if he does not want the data changed. The string read
in is an array of length 9. This is what I tried:

	if string = '         ' then data_does_not_change;

	This line is not being read for some reason the way
I would expect it to. Should this work? It could be that I forgot
something somewhere else, but I have had problems like this
throughout this program.


-- 
      //   David Tiberio  SUNY Stony Brook 2-3662  AMIGA  DDD-MEN   
     //  Not the llama! Come here Earl; I want to tell you something...
   \X/  Liverpool, New York	flames to suggestions@cbmvax.commodore.com
From: tommy@diku.dk (Tommy Andreasen)
Newsgroups: comp.lang.pascal
Subject: Re: Problem with TP6.0 turbo.tpl replacement
Date: 10 Apr 92 08:04:55 GMT
Organization: Department of Computer Science, U of Copenhagen

khill@vax1.umkc.edu writes:

>	Well, I guess I won't take the time to d/l this new .tpl file since
>I only have a 286/287 and "shrd dest,src,cnt is the 386 specific command for
>double precision shift right".  Does anybody out there think this file was
>compiled allowing forcing 386 commands.  Gee, doesn't sound like the guy
>who wrote .tpl replacement was terribly concerned about people with lower
>level processors than his.  I begin to wonder if the reason why this new
>.tpl is so much more efficient is because Borland used general 8088 commands
>that they knew could run on any machine, and this guy used the more efficient
>80386 commands, and not because he coded it so much more efficiently than
>Borland.

>			Ken Hill
>			--------
>			KHILL@VAX1.UMKC.EDU

	In the meantime a new version has been released, where the
error has been corrected. The tpl-replacement will now run on 8088`s
too.
					Tommy Andreasen
					tommy@freja.diku.dk
Newsgroups: comp.lang.pascal
From: adingus@magnus.acs.ohio-state.edu (Aaron T Dingus)
Subject: Turbo Version 3.X
Organization: The Ohio State University
Date: Fri, 17 Apr 1992 16:48:26 GMT

I recently got a book that says "covers Turbo Pascal 3.0".

I have v. 3.011A or something like that, and some of the
graphics commands that are listed in the book turn up as
bad identifiers.

Is this version handicapped somehow?  I recieved it with
the purchase of my used computer and I don't have the
original documentation that came with it.

If anyone out there has some information to help sort
this out, please drop me a line.

*Also, if someone has an old version that is colecting
dust and would like to sell, (that is better than 3.011A),
and can run on a 256K dinosaur, let me know.*

Thanks alot.

-ATD
-- 
Aaron T. Dingus
Professional Athelete
The Ohio State Univeristy
adingus@magnus.acs.ohio-state.edu
From: baylor@ccwf.cc.utexas.edu (Baylor)
Newsgroups: comp.lang.pascal
Subject: prob w/ putimage in 6.0?
Date: 16 Apr 92 19:02:56 GMT
Organization: The University of Texas at Austin, Austin TX


	I have had problems with get image and putimage for several
months now somewhat inconsistently. After concluding that either
a)i am a moron and just can't use it or b) something's wrong with
6.0, i thought i'd ask if anyone knows of putimage problems.
	Specifically, i use a 640*350 (egahi and ega mode, but it;s
a vga card), and try capturing most often blocks of  50x40 pixel
blocks. WHen i putimage them, they very often (but not always)
come out being maybe 200 pixels high, 10 pixels wide and very multi-
colored (all colors, no recognizable pattern).
	If it's a problem others have i'd like to know.
 Otherwise, if it's my fault, i know you guys can't tell without
me posting the code, which i'll do later if told it's not pascals
fault.
	Thanks


-- 
-----------------------------------------------------------------------
Baylor Wetzel    baylor@ccwf.utexas.edu         "There is no such thing 
IBM LAN Manager, University of Texas             as an innocent Kennedy"
"All opinions are soley those of the unix guys playing with my account"
-----------------------------------------------------------------------
Newsgroups: comp.lang.pascal
From: rstewart@daisy.ee.und.ac.za (Rosanne Stewart)
Subject: Pascal Tutoring System
Organization: Univ. Natal, Durban, S. Africa
Date: Tue, 7 Apr 1992 07:49:20 GMT
X-Bytes: 229

If you know of any research in the field or alernatively know
of people interested in the field, I would appreciate it if 
you could pass the information on to me.

Thank you.

Rosanne Stewart
E-mail:rstewart@daisy.ee.und.ac.za 
Newsgroups: comp.lang.pascal
From: bryant@perlis.mcs.gvsu.edu (John Q. Public)
Newsgroups: comp.lang.pascal
Subject: Resetting IOResult
Date: 14 Apr 92 20:22:56 GMT
Organization: The Alex Lifeson Fan Club

Does anyone know how to reset IOResult to zero after taking care of an
error condition?  My code looks something like this:
{$I-}
    perform I/O
    IF IOResult <> 0 THEN
        write(errormsg);
{$I+}
    
    After I get past the {$I+} however, IOResult still retains it's value
to blow up on the next I/O that is performed.  How do I reset it to 0?
Thanks,
JQP
From: preavley@cs.utexas.edu (Paul Reavley)
Newsgroups: comp.lang.pascal
Subject: text editor formatting
Date: 9 Apr 1992 20:08:38 -0500
Organization: U Texas Dept of Computer Sciences, Austin TX
NNTP-Posting-Host: grit.cs.utexas.edu

Can anyone direct me to source examples for adding simple
text formatting (underline,bold) to a text editor
(e.g. tvedit) - in pascal or c?  
-- 
               ===========-=-=-.-|-.-=-=-==========
               Paul Reavley  preavley.cs.utexas.edu  
      "Life is too precious to spend it on Unix" - Unknown
	             =====-=-=-.-|-.-=-=-=====
Newsgroups: comp.lang.pascal
From: ian@syacus.acus.oz.au (Ian Joyner)
Subject: C++ Critique in comp.lang.c++
Organization: ACUS Australian Centre for Unisys Software, Sydney
Date: Wed, 8 Apr 1992 12:08:40 GMT

I have placed a critique of C++ in comp.lang.c++. This may serve as a basis
of comparisons of Pascal (Object Pascal) to C++.
-- 
Ian Joyner                                     ACSNet: ian@syacus.acus.oz
ACUS (Australian Centre for Unisys Software)   Internet: ian@syacus.acus.oz.au
Tel 61-2-390 1328      Fax 61-2-390 1391       UUCP: ...uunet!munnari!syacus.oz
Newsgroups: comp.lang.pascal
From: chard@borland.com (Richard Nelson)
Subject: Re: Borland E-Mail address Wanted!!!!!
Summary: Borland on the Internet
Keywords: Tech Support
Organization: Borland International
Date: Fri, 10 Apr 1992 17:41:52 GMT

>Does anyone know if Borland has an internet E-Mail address?

Well, yes and no.

>I've run into a slight problem with some of the memory disposal methods and
>don't know if it's a bug in the compiler or what.  

There is an address, bugs@borland.com for reporting bugs.  It sends an
automatic acknowledging message, but it doesn't necessarily mean that
you'll get a personalized response or answer.  Borland doesn't offer
tech support via Internet.  Several of us at Borland read various
newsgroups regularly and participate in the discussions, but we do
so on our own; it's not an official part of the job.

The only official online tech support from Borland is on CompuServe,
GEnie, and BIX, as far as I know.

Probably the best way to get your bugs confirmed online is to post them
here.  Lots of folks here will let you know if you're right.  ;-)
-- 
=======================================================================
    Richard Nelson, Borland International  |  Go Bears!  Grrr-rah!
    chard@borland.com | MCIMail: RNELSON/BORLAND | CIS: 70670,1777
 Had this been Borland's opinion, I would have written it in a manual.
Newsgroups: comp.lang.pascal
From: Brad Taplin <btaplin@silver.ucs.indiana.edu>
Subject: Langs, TPW, advice?
Summary: ...for TP 55 or TPW.
Organization: Indiana University
Date: Tue, 7 Apr 1992 19:31:04 -0500

Skip this background stuff if you're in a hurry.
=============Some background begins===============
Hello. I've been hunting the best alternative to C.
Want a strong yet more standardized lang, quick to
compile, easier to debug, that produces fast, clean
and tight executables for Windows> Must be cheap.
According to Infoworld, BYTE, Windows, Comp Lang:

   1. Viz Basic and Realizer: Easy! exe too slow!
   2. Smalltalk 80 hardly does anything perfectly.
   3. ACTOR and Smalltalk /V: great theories, but
      huge exes, slow compiles & runs, many bugs. 
   4. Lisp, Scheme, Prolog are great for learning
      AI, but compilers and libraries are lacking.
   5. CASE tools are swell but code usually needs
      tightening, still requires work. Expensive.
   6. Fortran and COBOL: too painfully structured
      for many tastes, mine included. Aging ideas.
   7. Modula 2, particularly JPI, is wonderful but
      doesn't do Windows well. Maybe in the future?

Feel free to comment on these initial impressions. C
is too terse, loose, and tough to debug from what I
understand. It's is a scalpel and I'm no surgeon. So...
=================End of background info================

Any advice for somebody brand new to Pascal? Got a used
copy of Turbo 5.x and plan to purchase TPW when finances
permit and I feel I've earned it by learning to use TP5.

I particularly wanna know major steps in learning Pascal,
pitfalls, tips and tricks, maybe one great reference for
Borland's TP that won't make me too heavily dependent on
proprietary stuff. Wanna stay current, with OOP ideas and
all, yet not get lost in the forest too soon. Simple and
logical progression please. Is there an ideal textbook?
School is out since finances and work schedule preclude.

E-mail might be best, unless you're sure your advice will
have a wide appeal and not step on the toes of the FAQ I
assume this group carries from time to time. Thank you.   :)
From: tpehrson@javelin.sim.es.com (tim clinkenpeel)
Subject: please HELP - corrupted variables in file of records
Reply-To: tpehrson@javelin.sim.es.com
Organization: Evans & Sutherland Computer Corporation
Date: Wed, 8 Apr 1992 00:35:33 GMT

i would appreciate any insights into the following dilemma:

i have a file of 50 complex records.  variables i have not been manipulating
are getting corrupted values - for example, an array of integers is getting
wacked-out values--i initialize the file for the variables to be equal to the
array position, but after writing to it these values are replaced by unwanted
others.  it seems as though the variables that get corrupted are indeed the
ones i am not manipulating (difficult to verify).  another variable that likes
to get wigged out is the third in an array of string[11].  i have noticed that
there is a pattern of goofy characters appearing in the records i write to (i
initialize this particular variable to be '---Empty---', and after writing to
that record it is filled with extended and control characters AND, strangely
enough, can get to be well over the allotted 11 characters).

my ideas (please confirm or deny if you can):

1.  a value changed from, say, 999 to 1 corrupts the file (see below).  i would
    think this is not the case with what seems to be a good product (borland
    turbo pascal 5.0).
    --illustration--
    a. file: ...999[end of field marker]next value, etc.
    b. value in field containing 999 changed to 1, saved as
       ...1[end of field marker]9(left over from '999'), etc.
       thus corrupting all subsequent values.

2.  i am writing to the file using assign(filenm); reset(filnm).
    will changing from reset to rewrite fix this?  will using rewrite
    wipeout my file (yes, i do use seek)?  i haven't tried to debug by 
    changing over the rewrites because i am reading AND writing to the file
    between the reset and close.

3.  aliens from a far-away world are playing a prank on me.  what options
    do i have if this is the case?

4.  something i haven't thought of.
-- 
warning: my messages are offensive to morons |R| a person is only equal to all 
disclaimer: i exclusively represent myself! ||F|| others when s/he treats them
__________ lick bush in '92! _____________ |||R||| as such; inferior otherwise
>>>==-----+ i am tpehrson@javelin.sim.es.com, tim clinkenpeel i am +-----==<<<
From: raghu@nihdna.ncifcrf.gov (Raghu Nathan)
Newsgroups: comp.lang.pascal
Subject: help in binary tree
Date: 16 Apr 92 16:23:32 GMT
Distribution: comp.lang.pascal
Organization: NCI Supercomputer Facility, Frederick, MD

I am posting this for a friend of mine who does not have access to the net. 
If anyone has suggestions, please mail me. 

We can represent each node in a binary tree by
 

          type node
                =record
                 value=integer;
                 link =^node;
                 Rlink=^node;
                 end;

My friend wants procedures 

1. to create a binary tree from a file which contains an inorder and 
post order sequences of a tree T

2. list all the leaf nodes of the tree T.

3. to delete a node S from a binary tree T.

4. list the data files of the nodes of the binary tree T by level.  

Thanks.
From: s2942275@techst02.technion.ac.il (Yaniv Golan)
Newsgroups: comp.lang.pascal
Subject: Re: Help with Readkey
Date: 14 Apr 92 20:38:08 GMT
Reply-To: s2942275@techst02.technion.ac.il (Yaniv Golan)
Organization: Technion

In article <kt25i8INNf4h@matt.ksu.ksu.edu> holland@matt.ksu.ksu.edu (Rich Holland) writes:
>I've got a program which I'm trying to make VERY user-friendly.  I've got a
>routine called 'ShowTime' which does a direct-screen write of the time and
>date in the corner.  The user is allowed to turn this on or off at will from
>the main menu.  All of *my* subroutines have 'ShowTime' as the first call in
>each loop, so that the time will continuously update.  My problem is when I
>go to get user input with something like 'ch:=readkey' the time is not
>updating until after the keypress.  How can I make the time portion of my
>program "TSR-like" (i.e. continually updating, no matter what else is going
>on) and still remove it from memory when my program quits or shells to DOS?
>

how's about that:

while not KeyPressed do ShowTime;
ch:= ReadKey;

That way the time will be shows continously while you are waiting for
a key stroke, and when it arrives you can take it in a very little time.

Yaniv




-- 
Yaniv Golan
s2942275@techst02.technion.ac.il
From: dm2368@eecs1.eecs.usma.edu (Fichten Mark CPT)
Newsgroups: comp.lang.pascal
Subject: Re: file of data_type?
Date: 12 Apr 92 15:38:51 GMT
Article-I.D.: adm.30001

> David Tiberio writes:
>
> 	In my first run of my database, I used a file
> of type TEXT. But I want to use a file type of my custom
> design so that I can store everything in binary format.
> I tried:
> 
> var	infile: file of database_record;
> 
> 	but that did not work. I also tried file of binary.
> Any help?
> 
> -- 
>       //   David Tiberio  SUNY Stony Brook 2-3662  AMIGA  DDD-MEN   
>      //  Not the llama! Come here Earl; I want to tell you something...
>    \X/  Liverpool, New York	flames to suggestions@cbmvax.commodore.com
> 

David,

When using 

var
  infile : file of 'something'; 

the 'something' must be a TYPE not another variable.  For example, the
following works just fine:

var
  infile : file of integer;

Now, if you have a DATA TYPE that is called database_record and is
defined something like this:

type
  database_record = record Stuff : integer; end;

then you can do this:

var
  infile : file of database_record;

Good luck,
Mark Fichten
-- 
____________________________________________________________________________

CPT Mark Fichten      | INTERNET: fichten@eecs1.eecs.usma.edu              |
Captain U.S. Army     |           @trotter.edu:dm2368@eecs1.eecs.usma.edu  |
Work: (914) 938-5580  | USENET:   rutgers.edu!trotter!eecs1!dm2368         |
                      |           harvard.edu!trotter!eecs1!dm2368         |
____________________________________________________________________________
From: J_SCHULL@acc.haverford.edu (Jonathan Schull)
Newsgroups: comp.lang.pascal
Subject: is there a Pascal equivalent to C's unsigned long int?
Date: 10 Apr 92 17:43:35 GMT

or an easy conversion?
From: sbakker@cs.vu.nl (Bakker S)
Newsgroups: comp.lang.pascal
Subject: TP 6.0 constructors (bug?)
Date: 15 Apr 92 14:36:29 GMT

I don't know if this qualifies as a bug, but anyway:
When calling (unqualified) constructors from within another constructor,
the VMT field is not always set properly.

In the programmer's manual it is said that a constructor is called with
a VMT parameter, pointing to the object's VMT. When a constructor call is
qualified, the VMT parameter is nil, indicating that the constructor should
not initialize the VMT field.

This is all fine, but it makes unqualified constructor calls from within other
constructors very dangerous. Below is a short program to demonstrate this.

My point is the following:
	- Either the compiler shouldn't allow unqualified constructor calls
	  from within other constructors,
	- or it should automatically pass them a nil VMT parameter.

Also, the danger of unqualified constructor calls should be mentioned in the
user's manual, not just in some far away chapter in the programmer's manual
("Inside Turbo Pascal").

I know, it's probably not a real bug (after all, it *is* documented), but
it's still a bit obscure.

				Steven Bakker (sbakker@cs.vu.nl)

--------------------------------- cut here -----------------------------------

{
  Wed Apr 15 1992:
  Short program demonstrating weird constructor behaviour.
  Below, two objects are defined:
      - TBase
          TBase has two constructors: Init and Init2. Init2 just makes a
          (unqualified!) call to Init.
      - TDerived
          Derived from TBase, has no methods of its own.
  Now, creating an instance of TDerived and calling Init will result in the
  correct VMT pointer. However, creating an instance and calling Init2 will
  result in TBase's VMT pointer!

  The program creates two instances of TDerived, one initialized with Init,
  the other with Init2.
  It displays the various VMT pointers and if I'm correct, the P2 VMT will be
  equal to the TBase VMT (which is not quite what you'd expect).

	    Steven Bakker (sbakker@cs.vu.nl).
}

type
    PBase = ^TBase;
    TBase = object
	constructor Init;
	constructor Init2;
    end;

constructor TBase.Init;
begin
end;

constructor TBase.Init2;
begin
    Init; { TBase.Init is called with TBase's VMT-pointer! }
end;

type
    PDerived = ^TDerived;
    TDerived = object( TBase )
    end;

var
    P1, P2 : PDerived;
begin
    Writeln( 'TBase VMT   : ', Seg(TypeOf(TBase)^), ':', Ofs(TypeOf(TBase)^) );
    Writeln( 'TDerived VMT: ', Seg(TypeOf(TDerived)^), ':',
		Ofs(TypeOf(TDerived)^) );
    P1 := New( PDerived, Init );
    P2 := New( PDerived, Init2 );
    Writeln( 'P1 VMT      : ', Seg(TypeOf(P1^)^), ':', Ofs(TypeOf(P1^)^) );
    Writeln( 'P2 VMT      : ', Seg(TypeOf(P2^)^), ':', Ofs(TypeOf(P2^)^) );
    Dispose( P1 );
    Dispose( P2 );
end.
Newsgroups: comp.lang.pascal