HDTenEightyP/NetNews huggingface dataset:
From: amead@s.psych.uiuc.edu (Alan Mead)
Subject: routine to GETrgbpalette?
Organization: UIUC Department of Psychology
Date: Fri, 9 Oct 1992 23:00:56 GMT

I have figured out how to manipulate the RGB palette with SetRgbPalette
(I had to figure out which entries to change).

Now I'd like to restore the palette after I'm done. I'm only modifying
16 entries, but they are (1,2,3,4,5,20,7,56,...), so I don't think the
GetPalette() routine will work.  What I'd really like is a
GetRgbPalette() routine.  Does anyone know how to get that info?

Alternatively, I thought I might just define a default Palette and
change back to it.  I *thought* that the RGB values given under the
description of SetRgbPalette (pp 369-70 in v5.0 manual) were the ones
set by the VGA card (for the 64 EGA registers) at start-up, but my blue
background *dfeinitely* changes shades of blue after I "restore" to those
values :(

So, I would also be happy to have a better set of defaults.

Thanks a lot.

-alan mead
From: roth@oasys.dt.navy.mil (Pete Roth)
Newsgroups: comp.lang.pascal
Subject: Re: Problem with memory when compiling large program.
Date: 14 Oct 92 12:31:12 GMT
Article-I.D.: oasys.26340
Reply-To: roth@oasys.dt.navy.mil (Pete Roth)
Organization: The David Taylor Model Basin

In comp.lang.pascal, ss6349@tyr.albany.edu (Steven H. Schimmrich) writes:
>   I'm trying to write a large program in Turbo Pascal 6.0 and I'm running
>into some serious problems with memory.

For openers,

1. Remake your A program into Unit A.

2. Change your main program to

	program main ;
	uses a ;
	begin TheRealMain end .

3. Use the disk as scratch space for linking.

4. Change arrays to pointers to arrays & allocate them on the heap. Be
sure to balance allocate/deallocate calls, or the world will end.

5. Use the command line compiler instead of the IDE.

6. Write smaller code. :)

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: curzon@trooa.enet.dec.com (Richard Curzon)
Subject: Re: OOP questions
Organization: Digital Equipment Corporation
Date: Wed, 7 Oct 1992 16:39:48 GMT


In article <32915@adm.brl.mil>, BAKERRE@awc1.eglin.af.mil (Baker, Robert E.) writes...
> 
>	I have a few questions I need to ask about OOP, and from what I've
>seen in this newgroup, this seems to be as good a place to start as any.
>	While I am beginning to understand the basic concepts of OOP
>(encapsulation, inheritance and ploymorphism), the thing that seems to be a
>little hard for me right now is how do I determine what needs to be an object
>and what doesn't?  How far should I break something down for a starting point?

The best way to start OOP is: ATTACK.

I still go for the "Scandinavian school" of OOP, which doesn't get too 
stuck on "re-usability" and "real-life modelling".  Especially in your 
case, don't shy away from using technical objects that only mean something
in this particular program.  Don't worry about finding objects that
correspond with "user domain" realities. 

E.g. how about using TCollections of file objects,  or linked list objects,
in which each link contains a file object. 

Don't bend over backwards to try to bring in all the OO features in your 
first program.  They often don't apply anyway.  Many objects just have no 
need for you to add inheritance or polymorphism.  Learn what they are
anyway, and you will recognize when the situation does call for them later!

Before I started OOP, I bought a book for C programmers called Advanced C 
Struct Programming.  I found data structures (e.g. complex Pascal "records")
was a great foothold into OOP.  Once all the data that belongs together is 
pulled together in a "record", it's easy to see the "methods" that should
be tied to the data.  Presto: an object! 

As they say, JUST DO IT.  That'll cut the OO hype down to size...

                                Richard Curzon, Digital Equipment of Canada
				Toronto
   (from INTERNET)     curzon@trooa.ENET.dec.com 
   (from COMPUSERVE)   71371,2521  OR  >INTERNET:curzon@trooa.ENET.dec.com

Newsgroups: comp.lang.pascal
From: peter@psychnet.psychol.utas.edu.au (Peter R. Tattam)
Subject: Re: COMPARISION: LISP AND PASCAL
Organization: Psychology Department, University of Tasmania
Date: Wed, 14 Oct 1992 10:49:20 GMT

In article <1992Oct13.202257.11393@waikato.ac.nz> cdb@waikato.ac.nz (Craig D. Beere) writes:
>From: cdb@waikato.ac.nz (Craig D. Beere)
>Subject: Re: COMPARISION: LISP AND PASCAL
>Date: 13 Oct 92 20:22:57 +1300
>> LISP = Lots of Incredibly Stupid Parentheses.
>> PASCAL = Very stiff and formal student language.

I was always taught that it meant "Lots of Irritating Silly Parentheses"

Peter
----------------------------------------------------------------------------
P.Tattam                                    International Phone 61-02-202346
Programmer, Psychology Department           Australia     Phone   002-202346
University of Tasmania, Hobart, Tasmania, Australia
----------------------------------------------------------------------------
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: TCollection problem
Organization: Queen's University
Date: Thu, 15 Oct 1992 03:14:13 GMT

In article <hrpdko.13@pnv.palm.cri.nz> news@massey.ac.nz (USENET News System) writes:
>The TPW code below illustrates my problem, if I want to have an object 
>present in two (or more) collections, how do I go about disposing of my 
>collections? I think the cause of the problem is that the line Dispose(All,
>Done) frees the memory associated with object A, thus invalidating the 
>pointer to it in the Some collection. So... any suggestions for handling 
>collections which intersect? Please post replies to newsgroup as my mail is 
>temporarily stuffed.  

Here's one way:

Add a field to each object giving the count of the number of collections
it's in.   Override the collection Insert method to increment this count, and
the collection FreeItem method to decrement the count and only dispose of
the item if the count is 0.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: ts@uwasa.fi (Timo Salmi)
Subject: Re: Turbo Pascal --> Turbo C   translator
Organization: University of Vaasa, Finland
Date: Thu, 8 Oct 1992 05:40:41 GMT

In article <Oct08.022447.70106@yuma.ACNS.ColoState.EDU> dan@lamar.ColoState.EDU (Danilo Silva) writes:
>I have some 7,000 lines of code in Turbo Pascal that I would like to convert
>part of it to a C flavor (Turbo C, maybe?) in order to do some benchmarking.
>DOES ANYBODY KNOW ANY GOOD TRANSLATORS?  Are they available via INTERNET ftp?

Have you checked the information in the Frequently Asked Questions
already?

115799 Sep 20 08:35 garbo.uwasa.fi:/pc/ts/tsfaq30.zip

"If you do not know how to go about getting this material, users are
welcome to email me for the prerecorded garbo.uwasa.fi instructions
(long, circa 29Kb).  North American users are referred to the Garbo
mirror on wuarchive.wustl.edu.  Australian users are referred to the
archie.au mirror.  For the Asian users there is the NCTUCCCA.edu.tw
mirror.  The mirrors may lag occasionally, or might not have all the
files.  If you do not receive my reply within five days, please ask
your own site's system manager to construct a returnable mail path
for you". 

..................................................................
Prof. Timo Salmi
Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
Faculty of Accounting & Industrial Management; University of Vaasa
Internet: ts@uwasa.fi Bitnet: salmi@finfun   ; SF-65101, Finland


Newsgroups: comp.lang.pascal
From: ahall@nmsu.edu (HALL)
Subject: How to detect batery life?
Organization: New Mexico State University, Las Cruces, NM
X-Newsreader: TIN [version 1.1 PL6]
Date: Mon, 12 Oct 1992 05:05:33 GMT

[ Article crossposted from comp.sys.laptops ]
[ Author was HALL ]
[ Posted on Mon, 12 Oct 1992 05:04:17 GMT ]

I have been looking for a battery monitor that runs as an icon in windows.
Not being able to find one, I may as well right one my self.  Now, how do
I detect the battery life of a notebook.  There must be a system bios value
for this.  How does the warning light no to start blinking.  I am assuming
that most notebooks have some sort of low-battery warning.  I am probably
stuck if it is a purly electronic device.  Any ideas out there?  Of course
this will be freeware.
A. Hall
From: Louis.Mandelstam@p2.f42.n7101.z5.fidonet.org (Louis Mandelstam)
Newsgroups: comp.lang.pascal
Subject: Converting TP6.0 .EXE files to .COM
Date: 5 Oct 92 01:17:14 GMT
Article-I.D.: catpe.2541.2AD1D76D
Organization: FidoNet node 5:7101/42.2 - Lakeside BBS, Roodepoort


 >       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.

WHY would you want to convert your EXE to a COM?  MicroSoft has said that they plan to drop support for COM files in DOS in the future.  COM files have numerous problems with memory etc etc.

Cheers
The Poltergeist

--  
INTERNET: Louis.Mandelstam@p2.f42.n7101.z5.fidonet.org
via:  THE CATALYST BBS in Port Elizabeth, South Africa.
       (catpe.alt.za)   +27-41-34-1122 HST or +27-41-34-2859, V32bis & HST.
From: H.Vantil@massey.ac.nz (H. Vantil)
Subject: Re: DELAY in TPW
Organization: Massey University, Palmerston North, New Zealand
X-Reader: NETNEWS/PC Version 2c
Date: Thu, 15 Oct 92 23:24:20 GMT

The procedure DELAY can be found in the Win/Sys Library from TurboPower
Software.

Another satisfied customer of TurboPower Software.

-- 

           __          ___          |  Hank van Til
          |_ \__________/           |  Food Technology Dept
             /\_       /\           |  Massey University
          **/   \_    /  \**        |  Palmerston North
         * / *    \__/__*_\ *       |  New Zealand
         *   *          *   *       |
          ***            ***        |  H.Vantil@massey.ac.nz

Newsgroups: comp.lang.pascal
From: blong@ux4.cso.uiuc.edu (Brandon C Long)
Subject: Re: routine to GETrgbpalette?
Organization: University of Illinois at Urbana
Date: Sat, 10 Oct 1992 06:50:19 GMT

When I wrote a 256 color driver for TP 5.5, I used the following 
implementation for a GetRGBPalette command:

Procedure GetRGBPalette(Color: Byte; Var Red,Green,Blue: Byte);
 Var 
  Regs: Registers; {NOTE: Requires DOS unit!}

 Begin 
  Regs.AL:=$15;
  Regs.AH:=$10;
  Regs.BX:=Color;
  Intr($10,Regs);
  Red:=Regs.DH;
  Green:=Regs.CH;
  Blue:=Regs.CL;
 End;


This will work on any vanilla VGA card, and possibly EGA.
Note: This uses thie bios interrupts, so it is SLOW.  I used it because
it is all pascal code, and I didn't feel like writing assembler for it.

As for setting everything back to default, have you tried ending your
program with an 
  TextMode(Co80);
command?  It will reset the screen as if you typed mode co80 from DOS.
From: Paul.Robinson@f417.n109.z1.fidonet.org (Paul Robinson)
Newsgroups: comp.lang.pascal
Subject: RSA Sources
Date: 15 Oct 92 08:46:47 GMT

Reply-To: TDARCOS@MCIMAIL.COM  

 
Someone named "Robert" said the following on the Info-Pascal echo:  
  >I would appreciate it if anyone has an RSA algorithim coded in  
  >Pascal.  I'm especially stuck on the part where 100 digit integers  
  >have to be converted to binary.  If I get some nice responses I  
  >post my version of the program to this newsgroup in a few weeks.
 

 
I have seen a program called "PGP10" which is the executable and  
"PGP10S" which is the source to an RSA encryption algorithm.  The only  
problem is it's written in C and it's the only one that i've seen.
 

 
The problem is that the means and method of performing RSA encryption is  
subject to a patent on the algorithm used to perform it.  Technically it  
means it's illegal to develop a means of performing this without a  
license.  RSA will license anyone, but the fee is around $25 per person.
Newsgroups: comp.lang.pascal
From: konopka@ils.nwu.edu (Ray Konopka)
Subject: Problem using ExecWinWithSwap function
Organization: The Institute for the Learning Sciences
Date: Mon, 12 Oct 1992 14:40:06 GMT

I picked up EXECWS.ZIP from the wuarchive.wustle.edu mirror of
garbo.uwasa.fi site, and I tried incorporating the
ExecWinWithSwap function into my program.  

I am using the function so that I can get more free memory
when I shell out to DOS.  I was able to get everything to work
(i.e. setting up swap file, shelling to dos, etc. )
However, while I am in the DOS shell, the cursor behaves strangely.
Specifically, if I were to enter the DIR command at the prompt, I
might see the following on the screen:

C:\> d  ir

But when I press return, the dir command does indeed get executed.
Any help would be appreciated.

Thanks,
Ray Konopka
konopka@eagle.ibc.edu
-or-
konopka@aristotle.ils.nwu.edu
From: ECZ5LRH@mvs.oac.ucla.edu
Newsgroups: comp.lang.pascal
Subject: mailing list
Date: 8 Oct 92 17:37:38 GMT


 lynn humphrey would like to be on the mail. list
Newsgroups: comp.lang.pascal
From: peny@ppc.lpc.ethz.ch (Peter Nyffeler ,x4399)
Subject: looking for delay function (>=1s) for TP
Reply-To: peny@ppc.lpc.ethz.ch
Organization: ETH-Zuerich, Physical-Chemistry-Lab. - Switzerland
Date: Thu, 15 Oct 1992 10:34:38 GMT

For different experiments we need accuarte data aquistion in intervalls >=1s.

Has anybody a function for this application? 
I still use TP5.0 because, the data aquistion SW for DataTranslation Interface boards
are for this version.

>	Peter Nyffeler		Tel ++41 1 256 43 99
>	ETH-Zentrum		Fax ++41 1 252 34 02
>	Phys.Chem.Inst
>	CH-8092 Zuerich, Switzerland
From: root@bepcp.UUCP
Newsgroups: comp.lang.pascal
Subject: Re: Testing File Name Validity...
Date: 9 Oct 92 19:23:37 GMT

Re: Re: Testing File Name Validity...
By: kevinlu #0 @yoyo.cc.monash.edu.au (Kevin Lu) USEnet      
 
> > The file may, or may not, exist.  My question is, what is the best way to
> > test a string to see if it is a valid file name?  I am not even sure what
> Use the function contained in the dos (or is that system??)  unit that
> qualifies a filename, and check to see if DosError reports file not found
> or no more files.. (when you qualify a filename, it returns the exact path
> to the filename ie C:\DOS\COMMAND.COM)
> FExpand i think it is called. (FExpand does not open the file for access).
> Alternately, you could use the Assign procedure, then a Reset and then
> check the DosError variable..

Actually, FExpand alone won't do this.  All it does is add the drive letter
and path to a filename.  He'd have to do a FindFirst using the filename, if
he wants to avoid opening the file.

Then again, this isn't what the original question was about.  He wants to
test a string to see if MS-DOS will allow it as a filename.  The file might
exist, or it might not.  I believe that there is a (perhaps undocumented?)
DOS function that will do this; check the various interupt lists that are
floating around...

- Jim

The views expressed are the author's only,          email   : @bowker.com
and not those of Reed Reference Publishing, Inc.          ...!uupsi!bepcp
                                                     FidoNet : 1:2605/705
From: 9125113g@lux.latrobe.edu.au (Mitch Davis)
Newsgroups: comp.lang.pascal
Subject: Re: pc loader weird? (mips/ultrix)
Date: 12 Oct 92 15:44:29 GMT
Organization: La Trobe University

In article <92277.165637TXN102@psuvm.psu.edu> TXN102@psuvm.psu.edu (Phaedrus) writes:
>hello,
>
>i am not familiar with pc (mips/ultrix pascal compiler front end)
>and so am stymied by lots of messages indicating:
>
>Fixed up unaligned access for pid xxxx (a.out) at pc 0x401088
>
>tried messing with linker options (-kD) but it didn't help.  could
>anyone help me with this?  it is not life/death, but a major annoy-
>ance to see about 1000 of these messages for every run.

It annoys me too!  I had a program the other day doing that on a
DecStation 5000.  I fixed it by making a local variable of type "string"
global to the whole program.

-- It took me ages to find the culprit!

Mitch.
From: exuptr@exu.ericsson.se (Patrick Taylor)
Newsgroups: comp.lang.pascal
Subject: Re: Testing File Name Validity...
Date: 7 Oct 92 14:48:23 GMT
Organization: Ericsson Network Systems, Inc.
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.

In article <718437611.F00001@monly.wlink.nl.wlink.nl> Berend.de.Boer@p23.f112.n100.z60.wlink.nl (Berend de Boer) writes:
>From: Berend.de.Boer@p23.f112.n100.z60.wlink.nl (Berend de Boer)
>Subject: Testing File Name Validity...
>Date: 6 Oct 92 14:39:22 GMT

>HALL wrote in a message to All:

> H> I am writing a program in TP60 that prompts the user for a
> H> DOS filename. The file may, or may not, exist.  My question
> H> is, what is the best way to test a string to see if it is a
> H> valid file name?

>Just check for its existence. The online help of TP60 contains an
>example, search on topic Reset.

>Groetjes, ...... === Ent === 

>berend.de.boer@contrast.wlink.nl

Beware, too, of strings like 'nul' and 'con', which may open successfully, 
but will not produce the desired results necessarily.
 ----------------------------------------------------------------------------
   "This must be Thursday.  I never could get the hang of Thursdays"
                                                          - D Adams
  - Patrick Taylor
    Ericsson Network Systems
    exuptr@exu.ericsson.se             "Don't let the .se fool you"
    alternately, exuptr@ZGNews.Lonestar.Org
Newsgroups: comp.lang.pascal
From: ahall@nmsu.edu (HALL)
Subject: Re: Testing File Name Validity...
Organization: New Mexico State University, Las Cruces, NM
X-Newsreader: TIN [version 1.1 PL6]
Date: Fri, 9 Oct 1992 19:44:13 GMT

Berend de Boer (Berend.de.Boer@p23.f112.n100.z60.wlink.nl) wrote:
: HALL wrote in a message to All:
: 
:  H> I am writing a program in TP60 that prompts the user for a
:  H> DOS filename. The file may, or may not, exist.  My question
:  H> is, what is the best way to test a string to see if it is a
:  H> valid file name?
: 
: Just check for its existence. The online help of TP60 contains an
: example, search on topic Reset.
:

I don't mean check if it is a file, I mean check if it is a name
that could be assigned to a file.  I have received several diferent
replies as to whether these are valid file name characters, !@#$%^&().
Some say yes, some say no.
A. Hall
 
Newsgroups: comp.lang.pascal
From: chard@genghis.borland.com (Richard Nelson)
Subject: Re: Turbo Pascal 7.0 / BRIEF editor?
Summary: BRIEF in the IDE
Originator: chard@genghis.borland.com
Organization: Borland International
Date: Wed, 7 Oct 1992 20:37:56 GMT

>Now that Borland has bought the BRIEF editor, does anyone know if they
>have any plans to incorporate this into their integrated environments?

Borland announced when they bought BRIEF that some of the BRIEF
technology would be incorporated into the integrated development
environments.  As usual, no specific product details are being
announced in advance.

>When?

And the same goes for schedules.  Borland does not pre-announce its
products (at least, not if we can help it!) or their schedules. I think
Philippe Kahn's stock answer to this type of question is "When it's
ready."
-- 
=========================================================================
 Richard Nelson, Borland Int'l | chard@borland.com | Go Bears! Grrr-rah!
  Had this been Borland's opinion, I would have written it in a manual.
  "You may be a lover, but you ain't no dancer." -- Lennon & McCartney
Newsgroups: comp.lang.pascal
From: rwirthli@nyx.cs.du.edu (Ralph Wirthlin)
Subject: Re: FAQ referrals
Organization: University of Denver, Dept. of Math & Comp. Sci.
Date: Fri, 9 Oct 92 20:18:22 GMT


I just received some mail from some folks taking me to task for my little
tirade.  I certainly meant nothing personal against Timo and I *do*
appreciate his efforts, however I think the whole reason for newsgroups
has been overlooked.  If we were all *really* concerned about saving
bandwidth, we wouldn't post at all, boy that would solve a lot of
bandwitdh problems.
   IMHO, the whole purpose of comp.lang.pascal and the entire USENET
philosophy is the exchange of information.  Someone needs some tidbit of
information, if the answer is short and sweet, why not post it?
Besides, what makes a FAQ-list the all-knowing, all-authoritive answer
to a FAQ (meant authoritative).
     Just my $0.02 as well :)
From: dan@lamar.ColoState.EDU (Danilo Silva)
Newsgroups: comp.lang.pascal
Subject: Turbo Pascal --> Turbo C   translator
Date: 8 Oct 92 02:24:47 GMT
Organization: Colorado State University, Fort Collins, CO  80523


I have some 7,000 lines of code in Turbo Pascal that I would like to convert
part of it to a C flavor (Turbo C, maybe?) in order to do some benchmarking.
DOES ANYBODY KNOW ANY GOOD TRANSLATORS?  Are they available via INTERNET ftp?

It's not that I'm not happy with TP, it's just that lately when I go to a
bookstore I find 3 shelves of C literature and only half dozen Pascal books.

Personally, I think that this C trend is absurd (it's like going backwards
into the path of developing in higher level languages).

Thanks in advance for everybody's input,

Dan Silva
dan@lamar.colostate.edu

Disclaimer:  default.
From: det15wx@osan-emh.af.mil (DETACHMENT 15 WEATHER)
Newsgroups: comp.lang.pascal
Subject: (none)
Date: 14 Oct 92 08:21:27 GMT

>From:      zlsiida@fs1.manchester-computi
>Subject: Re: Different Graphic Adapters
Dave Budd writes:
>>the monitor is.  I have already incorporated all the Borland BGIs into BGIDRIV
>>and like to include them with the .EXE so that .BGI files don't have to
>>lying all over the place.  Thanks for any help provided.
>How?  One of my users just asked how to call RegisterBGIdriver more than 3
>times without generating an internal table overflow.  Can you get away with
>using just InstallUserDriver?  Can you increase the size of the driver
>table? He also is writing a program which must run on a range of monitors/
>graphic cards.  But I think he intends to put in a user question for monitor
>type, not auto detect it.
   I think this is exactly the problem I'm running (or will run) into.
Putting in a user question first of all is something that the software should
be able to handle by itself.  And it still leaves the problem:  what if the
user says he's CGA and you have only room for Herc, EGA, and VGA (for example).
Using BGIs can be a real headache!  Why can't there be one BGI with all the
hooks for major video cards?  Yes, I know that would be a substantial
increase in code size.  How do the "pros" do it?  I see many programs that
work perfectly well on all different graphics modes.  Thanks for the help.
     Ken
---------------------
Ken Waters    USAF, Maj, Staff Weather Officer, Yokota AB, Japan (Fussa-shi)
Internet:  DET15WX@osan-emh.af.mil     or  374OSSDOW@yokota-emh.af.mil
Compuserve: 73307,131 (checked once a yr!)       N4PBY/HL9PIT/J71???
---------------------