HDTenEightyP/NetNews huggingface dataset:
From: j.laidman@cowan.edu.au (Jeremy Laidman)
Newsgroups: comp.lang.pascal
Subject: TP7 improved encapsulation?
Date: 17 Nov 92 00:48:42 GMT
Organization: The University of Western Australia
Distribution: world
Reply-To: j.laidman@cowan.edu.au (Jeremy Laidman)
NNTP-Posting-Host: scorpion.ac.cowan.edu.au


TP6 introduced object encapsulation with the PRIVATE keyword.  The problem
is that it only hides the details to the unit level.  Can anyone who's seen
TP7 tell me if that has been tightened to the object level?

Actually, the ideal would be to have a PUBLIC keyword, where by default all
attributes are hidden within the unit, and only accessible via method calls.
One would be able to override this with a PUBLIC section.  This would make for
a more object oriented language.  Any comments?

---------------------------------------------------------------------
Jeremy Laidman, Computer Support Officer
Department of Computer Science                 Phone: (61 9) 370 6648
Edith Cowan University                         Fax:   (61 9) 370 2910
Perth, Western Australia                       j.laidman@cowan.edu.au
---------------------------------------------------------------------
From: bobbe@vice.ICO.TEK.COM (Robert Beauchaine)
Newsgroups: comp.lang.pascal
Subject: Re: BP/TP OOP is missing something...
Date: 18 Nov 92 17:43:18 GMT
Organization: Tektronix, Inc., Beaverton,  OR.

In article <dmurdoch.171.722054313@mast.queensu.ca> dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:

>On the other hand, it seems that it would be rather inefficient in lots of 
>code.  For example, I often write routines that need to do calculations 
>before they can call the constructor for an object; if it had already been 
>constructed, would I have to destroy it before changing it?  A simple 
>example would be reading a matrix from a file:  I might read a line to get 
>the matrix dimensions, construct an appropriate matrix, and then read the 
>data into it.  How are situations like that handled with automatic 
>constructors?  Or is the automatic construction optional?  If so, that just 
>leads to code equivalent to the TP code.
>

  Constructors come in many flavors in C++.  There are default
  constructors, copy constructors, and explicit constructors.

  Default constructors are called when you don't initialize an
  object at its declaration:

     anobject x;  /* The default constructor is called here */

  For your matrix example, the default constructor would initialize
  you dynamic memory pointers to NULL, set your dimenension(s) to 0,
  and whatever else is required when you don't know the size of your
  matrix.  

  Copy constructors are used to create an object from an already
  existing ojbect:

    anobject x;
    anobject y = x;  /* Copy constructor called here */

  This is preferable to a bitwise copy, especially for classes like
  a matrix where you want to copy the information from y, but don't
  want to create two pointer references to the same memory.

  And finally, there are explicit constructors:

    anobject x(3,column1,column2,column3)

  Here, you are calling a (previously defined) constructor that
  accepts a dimension and a list of the column vectors out of which
  to build the matrix.

  In all of these examples, if the objects were allocated on the
  stack as in a function, they would automatically be destroyed when
  you fell off the end of the function code; no fuss, no muss, no
  objects accidentally left over gobbling up memory.

  Your matrix example is a poor one to use as an example of automatic
  construction, since a generic matrix class doesn't have a size
  until you exlicitly give it one (what's a default matrix?) .  
  Many other objects don't have this problem, and automatic 
  construction would alleviate the programmer of the task of creating 
  and destroying them.


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ 

Bob Beauchaine bobb@vice.ICO.TEK.COM 

"Look, I tried the cat experiment.  On the third trial, the cat was
dead.  On each of the subsequent 413 trials, it remained dead.  Am I
doing something wrong?"
			James Nicoll

Q.  How many Heisenbergs does it take to screw in a light bulb?
A.  If you know the number, you don't know where the light bulb is!

Newsgroups: comp.lang.pascal
From: Ken Stuart  <kps1@cornell.edu>
Subject: Frustrated with TVision
Nntp-Posting-User: kps1@cornell.edu
Organization: Cornell University
X-Useragent: Nuntius v1.1.1d1
Date: Wed, 18 Nov 1992 18:01:51 GMT

Hi, I've just started learning to program with Turbo Vision, in Turbo
Pascal 6.0, but am extremely frustrated with trying to understand it and
get it to work.  I've obtained shazam and dlgdsn, hoping that they would
help, but they have not.  Can you recommend any references that cover
learning TVision with lots of examples?  The standard TP 6 manuals don't
seem to be helping me much.  If so, plese let me know directly at
kps1@cornell.edu.  
Thanks, Ken Stuart
From: null@diku.dk (Niels Ull Jacobsen)
Newsgroups: comp.lang.pascal
Subject: Re: Stony Brook Pascal
Date: 23 Nov 92 14:35:38 GMT
Organization: Department of Computer Science, U of Copenhagen

sl8nl@cc.usu.edu writes:

>> I just received an information package from Stony Brook about their new
>> Pascal product for PCs.  It looks really interesting (some highlights: .obj
>> support, multi-language support (e.g., call or be called by C functions),
>> smart linking, aggresive optimizer, fully compatible with Borland/Turbo
>> Pascal (I presume v6), ....
>> 
>> Does anybody now anything else about the company, product, etc.?

>All the above is correct.  It is probably one of the best optimizing compilers
>on the market.  It is fully compatible and so on.  The company's tech support
>is really good (at least when I've called them).  When I bought it, I had my
>doubts, but it is well worth the money.

When you say "fully compatible", what do you mean: Can you recompile Turbo Vision with it? Is it TPU-file compatible with TP6? TP7?

I am working on a project, which uses a lot of time for some rather
trivial calculations. Lots of time means, that one run take appr. 7-8
hours. Unfortunately, it is all written in Pascal by engineers, who
has little training in efficient programming. And they don't have the
time or inclination to learn C. Therefore I am looking for an
efficient, optimizing compiler.

Would you be able to compile a pascal program for me, if I send you
one? And return the program to me uuencoded? I would like to see how
much the Stony-Brooke compiler would do for a typical program of the
kind they're working with, before I recommend that they buy the SB
compiler.

Alternatively, do you know if SB has a internet address? They probably
wouldn't mind giving me a demo of their product in this way.

>-Joshua Jensen

   Niels Ull Jacobsen, Dep. of C.S., U of Copenhagen (null@diku.dk)
   Adaz sighed.  "So how long will this journey take?" 
   "A month?" Sutekh shrugged.  "Depends on when the horses die." 
     -- from "Adaz & Sutekh" by Jeff Stehman

-- 
   Niels Ull Jacobsen, Dep. of C.S., U of Copenhagen (null@diku.dk)
   Adaz sighed.  "So how long will this journey take?" 
   "A month?" Sutekh shrugged.  "Depends on when the horses die." 
     -- from "Adaz & Sutekh" by Jeff Stehman
Newsgroups: comp.lang.pascal
From: msfuller@cc.utah.edu (MARC S. FULLER)
Subject: Large arrays in BP 7.0
News-Software: VAX/VMS VNEWS 1.4-b1  
Organization: University of Utah Computer Center
Date: 17 Nov 1992 16:53 MST  

Does anyone know if BP 7.0 with the dos extender will allow larger arrays than 
the 64kB limit, or is the extender similar to TPW 1.5 where this can only be 
accomplished through pointers?
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: I found a compiler bug in TP6.0, maybe...
Organization: Queen's University
Date: Mon, 23 Nov 1992 16:45:46 GMT

In article <1eqvj5INNprl@bigboote.WPI.EDU> gregs@wpi.WPI.EDU (Floppy) writes:

>>> >  writeln(days[num-1]);

>	This really is a bug.  The manual clearly states that when an
>arithmetic expression contains two integral types, both numbers will first be
>converted to the smallest integral type containing the entire range of both of 
>the original types.  In this case, the smallest such type is longint, since
>the two original types were word and shortint.

No, that's not how the expression is parsed.  It's not "(num) + (-1)", it's
"(num) - (1)".  Both "num" and "1" are compatible with the word type, so 
that's how the expression is evaluated.

It's dangerous to rely on the automatic conversions, because it's not always 
obvious how the compiler will apply them.  One that may surprise, but which 
is compatible with the language definition, is the following:

  var
    b1,b2 : byte;
  begin
    b1 := 255;
    b2 := 255;
    if b1*b2 < 0 then
      writeln('Surprise!');
  end.

BTW, I've just discovered that this is a bug in BP 7.0:  it behaves the same 
as TP 6 in this expression, even when overflow checking is enabled.  It does 
an unsigned multiply (which doesn't overflow), checks for overflow (and 
doesn't see any), then does a signed comparison with 0 and sees a negative.

Duncan Murdoch

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: baylor@ccwf.cc.utexas.edu (Baylor)
Newsgroups: comp.lang.pascal
Subject: Re: tp graphics
Date: 16 Nov 92 21:46:51 GMT
Organization: The University of Texas at Austin, Austin TX

>
>As to SetActivePage and SetVisualPage, Borland has not produced a 320x200x256 driver
>that does have working page routines;  I've never found one that does and I've quite
>a collection!!  I've never found out why, because it is SOOOO simple to implement but
>they just HAVEN'T DONE IT YET!!  Again, Scott's gametp10.zip contains the facility

	They haven't done it yet because it's imposible.
	That is if you're refering to spare video pages i mode $13.
	Mode $13 is linear because they disabled chain4. 320x200 uses all
64k available. To get around this and have spare pages, you either need
to go planar (mode Y 320x200x4 linear mapping) or else create a virtual
page like array[0..64000] of byte and when swapping you actually 
do a lds array, movsw of the whole page (how sprites, wgt and i think
gametp does it).
							- baylor


Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: TPW TCollection
Organization: Queen's University
Date: Tue, 24 Nov 1992 05:22:45 GMT

In article <92328.152730F0O@psuvm.psu.edu> F0O@psuvm.psu.edu writes:
>   I would simply make the following changes to your code:
>
>Old code:
>  ClientInformation = record
>
>New code:
>  ClientInformation = object(TObject)
>
>   Now you can store your client information into the collection.

You can store it even if it's not an object; the problem comes when you 
dispose of the collection, since it attempts to call the Done destructor for 
each item that it contains.  Just making the change you suggested isn't 
enough to fix this; the objects wouldn't be initialized, so the Done call 
wouldn't be possible.  You also need to call the constructor for each object.
(There's no need for a new ClientInformation constructor; the inherited 
TObject.Init constructor is good enough.)

Duncan Murdoch
From: holland@matt.ksu.ksu.edu (Rich Holland)
Newsgroups: comp.lang.pascal,ksu.talk.drivel
Subject: Re: Turbo Scheme
Date: 22 Nov 1992 19:00:27 -0600
Organization: Kansas State University
NNTP-Posting-Host: matt.ksu.ksu.edu

exuhag@exu.ericsson.se (James Hague) writes:

>I think the original objection was that Borland took a standardized
>language, added and removed and changed things to suit its own purposes,
>and then released it as Pascal.  Yes, the result is a wonderful
>language, one eminently more useful than its predecessor, but the
>end result just isn't that same language which is described in the
>Pascal standard.  Read Kernigan's "Why Pascal Isn't My Favorite
>Programming Language."  Turbo Pascal users will wonder what the
>hell is he talking about.

Anyone know where I can find a .ps or ASCII version of this?

-- 
Rich Holland              | INTERNET: holland@matt.ksu.ksu.edu
100 Jardine Terr, Apt A7  | BITNET  : holland@ksuvm
Manhattan, KS  66502-3357 | UUCP    : ...!rutgers!matt.ksu.ksu.edu!holland
char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
From: wayne@hpfcso.FC.HP.COM (Wayne Covington)
Date: Wed, 18 Nov 1992 18:49:43 GMT
Subject: Re: trying to use ioresult in HP-UX Pascal...
Organization: Hewlett-Packard, Fort Collins, CO, USA
Newsgroups: comp.lang.pascal

hemstree@lamar.acns.colostate.edu (Charles Hemstreet) writes in part:

> I am using the following program out of the HP manual and I can't seem
> to get it to work...

> [ sample program trying to use ioresult in HP Pascal deleted ]

> How do I enable this language extension?

Include the following declaration:

   var ioresult['asm_ioresult'] : integer;

Also include the compiler option:

    $STANDARD_LEVEL 'HP_MODCAL'$  (if you're using HP-UX release 6.0 or later)

 or $SYSPROG ON$                  (if you have a pre-6.0 release)

to enable try/recover/escapecode.

Wayne
Newsgroups: comp.lang.pascal
From: stone@hilbert.math.grin.edu (John David Stone)
Newsgroups: comp.lang.pascal
Subject: Turbo Scheme
Date: 20 Nov 92 14:54:31 GMT


        Pontus Gagge writes:

>           What we *really* need is obviously Turbo LISP (or even
>  better, Turbo Scheme).  Does anyone know when Borland will release
>  version 1.0?  ;-)

        Don't even joke about it.  One of my biggest fears as a teacher of
computer science is that Borland will trash Scheme as a language for
learning programming the same way they ruined Pascal and tried to ruin
Prolog.

------  John David Stone - Lecturer in Computer Science and Philosophy  -----
--------------  Manager of the Mathematics Local-Area Network  --------------
--------------  Grinnell College - Grinnell, Iowa 50112 - USA  --------------
--------  stone@math.grin.edu - (515) 269-3181 - stone@grin1.bitnet  --------
From: s924683@minyos.xx.rmit.oz.au ( Chandi )
Newsgroups: comp.lang.pascal
Subject: Re: SVGA DRIVER AVAILABLE
Keywords: FTP
Date: 17 Nov 92 00:23:11 GMT
Organization: RMIT Computer Centre
NNTP-Posting-Host: minyos.xx.rmit.oz.au


The DIGITAL CRIME SVGA DRIVER is now definately available via FTP
ftp sites
  OAK.Oakland.Edu (141.210.10.117)
    /pub/msdos/pascal/dc2.zip

  wuarchive.wustl.edu (128.252.135.4)
    /mirrors/msdos/pascal/dc2.zip

  archie.au (139.130.4.6)
    /micros/pc/oak/pascal/dc2.zip
        
 And a few more mirror sites.  If you waht the whole list contact me.

 login :anonymous
 password : Your E-mail adress

    The file is compressed using PKZIP

    If U cannot use ftp mail me and I will Mail it to you.  But please try 
    FTP first.
--chandi
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::            <<CHANDI>>  Chandana H. Perera      [[DUAL DEGREE]]        ::
::<<RMIT>> Royal Melbourne Institute Of Technology, Melbourne, Australia ::
::     Computer Science \ Electronics and Communications Engineering     ::
::s924683@minyos.xx.rmit.OZ.AU | chandi@maria.wustl.edu                  ::
::           "Black holes are God dividing by zero"                      ::
:: Cootmundra Street, Doveton, VIC 3177, Australia     +(03) 792-3415    ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

__________________________________________________________________________
                     DIGITAL CRIME (Aust.)
__________________________________________________________________________
Chandi  +(03) 792-3415           |   Ed +(03) 366-5884
  s924683@minyos.xx.rmit.OZ.AU   |     s924698@minyos.xx.rmit.OZ.AU
  7  Cootmundra St,              |     19 McRae Ave,
  Doveton. VIC 3177, AUSTRALIA   |     St. Albans. VIC  3021, AUSTRALIA
__________________________________________________________________________
      "A Jedi's strength flows from the force."  - STAR WARS
__________________________________________________________________________
From: rwy@matt.ksu.ksu.edu (Robert Young)
Newsgroups: comp.lang.pascal
Subject: Using Borland C and Pascal together
Date: 19 Nov 1992 14:56:19 -0600
Organization: Kansas State University
NNTP-Posting-Host: matt.ksu.ksu.edu
Summary: Can BP use libraries created with BC?
Keywords: Pascal C C++ Libraries

I want to know if the Borland Pascal and C/C++ compilers are
compatible at any level.  I'm pretty sure I can get DLL's made
with BC++3.1 to work with the Windows versions of BP (pre 7.0) and
with 7.0.  But are the .LIB (library) files I create with BC++3.1
compatible in any way with BP?  

Years ago, the BP3.0 and TC2.01 were compatible (I think) but I 
haven't kept up on BP at all!

Please reply via e-mail to Robert Young   rwy@matt.ksu.ksu.edu

Newsgroups: comp.lang.pascal
From: ploof@griffin (Scott B Ploof)
Subject: 640x480 Info Needed
Organization: University of Vermont -- Division of EMBA Computer Facility
Distribution: net
Date: Sun, 15 Nov 1992 22:16:57 GMT

I want to write a simple screen capture program, to save 640x480 images in
a "raw" format...that is no compression routines involved.  I wrote one
for 320x200 but 640x480 is slightly different to work with.

Could soomeone explain, or give Turbo Pascal code, to the color planes idea
that 640x480 utilizes?  I can't seem to figure out how to capture the planes
If I can capture them I can reverse the process, but information here in
the sticks is a little hard to find on computer issues so........

write to me at Ploof@uvm-gen.emba.uvm.edu   or
FTP to 141.214.4.135   projects/legacy

or post them here....            

thanks in advance...

Newsgroups: comp.lang.pascal
From: rbt@tous.oau.org (Robert B. Tate)
Subject: Re: BP 7.0 upgrade and ProtoGen
Organization: Tate Enterprises
Distribution: na
Date: Tue, 17 Nov 1992 01:44:30 GMT

In article <1992Nov16.150843.5412@prism.poly.edu> ssnyder@prism.poly.edu (Sharon Snyder) writes:
>I recently ordered BP7.  As a registered owner of TP 6 and TPW 1.5
>I thought (according to this group) that I was etitled to a free
>copy of protogen.  Unfortunately I am not....they said it is
>because I bought TPW 1.5 AFTER Aug 21, 1992.  Is this the case
>with everyone or was I taken for a ride?  Also, if you order the

	I just ordered mine also and I thought the same thing but I was
	assured that it was not so by the person that took my order.

>CD Rom AND the disks....they charge you $5 shipping extra for the
>CD.....what a rip off (yes, they were on the same order).  Does
>anyone have a comment.  I didn't think that $5 for the CD Rom as
>well as $19.95 for the price of the Disc is too fair if you are already
>getting the books and disks on the same shipment.
>

I think that at least part of that is for someone to handle the order as
well as the shipping charges. I dought that they have that combo
pre-packaged (although they might start soon ), so some one has to pull
the disk and ship it out as a seperate order and/or package it up with
the other part of the order special. I really don't like the extra
charge, but I can understand it.

BTW: I don't work for Borland or anything else except being a customer.


-- 
 rbt@tous.OAU.ORG  (Robert B. Tate)       | A little knowledge is a dangerous
 {ucf-cs,peora,tarpit}!tous!rbt           | thing. Any less can kill you.
Newsgroups: comp.lang.pascal
From: njonker@cs.vu.nl (Jonker N)
Subject: TCP/IP and Serial port from Turbo Pascal.
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Date: Tue, 24 Nov 1992 00:18:17 GMT

Hullo all,

I am looking for Public Domain TPU's that will help me to send and re-
cieve TCP/IP packets from a Turbo pascal program, and also for a pac-
kage that lets me handle the serial port. Can nayone who uses things 
like this contact me (Email prefferred) and tell me what their expe-
riences are and what they use? 

Before I get flames.. I am not only looking for the stuff (I have archie
too :*) I want some input on it as well.. That's why this posting.

Niels.
-- 
Niels Jonker, njonker@cs.vu.nl, n_jonker@sacam.oren.ortn.edu
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Newsgroups: comp.lang.pascal
Subject: Re: Encryption and Random Numbers
Date: 18 Nov 92 14:21:49 GMT
Organization: Queen's University

In article <1992Nov17.211502.18511@lynx.dac.northeastern.edu> cschmidt@lynx.dac.northeastern.edu (Christopher Schmidt) writes:
>Duncan Murdoch's interesting STREAMS package includes some
>clever encryption logic that uses the TP random number
>generator.  It's a nice technique, except that if Borland
>modifies the TP random number generator, then you and your
>customers will be locked out of your encrypted data.

That's a good point.   I have Pascal code that is equivalent to the TP 6 
random number generator; I'll include it in the next Streams release.  It's 
not nearly as fast as the real thing, so it'll be a conditional include, 
depending on the compiler version.  

Once I dig up the code, I'll post it here.  You could figure it out yourself,
pretty easily:  It's of the form

  RandSeed := A*RandSeed + B;

and I think B is 1.  If you're using TP/BP 7, be sure to compile it with 
overflowchecking turned off.  There's an implicit "mod 2^32" in there that's 
essential.

Come to think of it, the new longint optimizations might make the Pascal 
version competitive with the RTL version.  I'll have to do some timings.

Duncan Murdoch

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: bobbe@vice.ICO.TEK.COM (Robert Beauchaine)
Newsgroups: comp.lang.pascal
Subject: Re: Comments on Turbo (Borland) Pascal 7.0?
Date: 18 Nov 92 21:26:20 GMT
Organization: Tektronix, Inc., Beaverton,  OR.

In article <1992Nov18.174335.2758@exu.ericsson.se> exuhag@exu.ericsson.se writes:
>Niels Ull Jacobsen writes:
>
>And on a vaguely related subject, here's a neat idea:  since the
>editor already has to go through the trouble of doing lexical
>scanning (to determing proper colors), maybe it should be taken
>one step further.  Keep the files, both internally and on disk,
>in a tokenized format.  This would allow better memory usage (smaller
>files) and would speed up the compiler.  Many assemblers and a 
>few compilers on 8-bit computers used to use such a scheme.

  Take a look at Microsoft's Quick Basic for a fine example of a
  threaded interpreter/compiler.  

  I agree with you completely.  This should be particularly easy to
  implement in Pascal given its syntax and declaration rules.
  Incremental compiling also allows you to debug code w/o even
  running it since the compiler has to parse each line of code as it
  is written; i.e. no more misplaced semicolons, no more forgetting
  to parenthesize boolean expressions in if...then statements, etc.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ 

Bob Beauchaine bobb@vice.ICO.TEK.COM 

C: The language that combines the power of assembly language with the 
   flexibility of assembly language.

Real friends don't let friends use UNIX.
Newsgroups: comp.lang.pascal