HDTenEightyP/NetNews huggingface dataset:
From: leonard@qiclab.scn.rain.com (Leonard Erickson)
Subject: Re: Records and strings
Keywords: Help!
Reply-To: 70465.203@compuserve.com
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
Date: Sat, 29 Aug 1992 13:11:21 GMT

kjell@elixir.e.kth.se (Kjell Rilbe) writes:

>In article <1992Aug24.033429.15678@qiclab.scn.rain.com> 70465.203@compuserve.com writes:
>>>
>>>Now in my ValidRecord() function call, I tried to do something like this:
>>>
>>>Function ValidRecord(ARec : ARecord) : Boolean;
>>>Var Tmp : Boolean;  { temporary results }
>>>Begin
>>>  Tmp := True;
>>>  If Not ValField1(Field2String(ARec,1)) then Tmp:=False
>>>  Else If Not ValField2(Field2String(ARec,2)) then Tmp:=False
>>>  : 
>>>  Else If Not ValField17(Field2String(ARec,17)) then Tmp:=False;
>>>  ValidRecord:=Tmp;
>>>End; { ValidRecord }
>>
>>Well, why not do it *this* way?
>>
>>Function ValidRecord(Arec : Arecord) : Boolean;
>>var tmp : boolean;
>>begin
>>	Btmp:=true;
>>	tmp:=tmp and Valfield1(Arec.field1);
>>	tmp:=tmp and ValField2(Arec.field2);
>>	....
>>	tmp:=tmp and Valfield17(Arec.field17);
>>        ValidRecord := tmp
>>end;
>>
>>I can't figure out why you even bothered with that other stuff.
>>Also note the much cleaner direct boolean assignment. 
>>-- 
>>Leonard Erickson		      leonard@qiclab.scn.rain.com

>Well, at least there's one good reason to do it the way Rich does.
>It will execute faster, since in most cases only a few of the
>ValField* functions will be called.

So do it *this* way:

{$B-}
if ValidField(1,Arec) and ValidField(2,Arec) and ...
   ... and Validfield(17,Arec) 
then
  ValidRecord :=True
else
  ValidRecord := False;
{B+}

That'll do it fast *and* be readable!
-- 
Leonard Erickson		      leonard@qiclab.scn.rain.com
CIS: [70465,203]			 70465.203@compuserve.com
FIDO:   1:105/51	 Leonard.Erickson@f51.n105.z1.fidonet.org
(The CIS & Fido addresses are preferred)
From: S105728@umrvma.umr.edu ( Steve Poulsen)
Newsgroups: comp.lang.pascal
Subject: Printer Polling
Date: 3 Sep 92 01:15:51 GMT

This is a FAQ [I believe] but here goes:

To poll the printer you will need:

Knowledge of TP6.0 type Registers
Knowledge of Intr procedure
Knowledge of ASM...END {optional}
And the proper interrupt.  Int 17h

An example call might be:  Intr($17,Regs); Where Regs is of type registers.

To find out about Int 17h [along with others], I highly recommend Ralf
Browns' Interrupt list:  INTER31x   [I believe the name is] Where x is
A-C [I believe again].  This can be found at many FTP sites.

P.S. I've posted this [along with others] many times and this is the last.
     However if help is needed, feel free to E-mail me.

========================================      ,--,
  Steven P. Poulsen <S105728@UMRVMA>       ,'  '--,
  Student of Electrical Engineering        ---, ,'
  University of Missouri - Rolla            ,','
=======================================    , '
From: Gordon.Farquharson@p12.f120.n7102.z5.fidonet.org (Gordon Farquharson)
Newsgroups: comp.lang.pascal
Subject: using EMS
Date: Thu, 03 Sep 92 21:00:00 GMT
Organization: FidoNet node 5:7102/120.12 - Interlink BBS, CT


On 02 Sep 92, anonymous muttered to All:

 a> Could someone please email or post a source example
 a> showing how to get, use, and release LIM4.0 EMS memory
 a> in a pascal program.  Preferabbly Turbo Pascal but not using object
 a> oriented techniques.

There are lotsa interrupts to do this sorta thing... Try the latest version of Ralf Brown's Interrupt List (excelent). It will describe how to use each interrupt know at publication. It has EMS interrupt information. I can leave it on a BBS for you if you want me to.

Cheers,
       Gordon

--  
INTERNET: Gordon.Farquharson@p12.f120.n7102.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: richard@paragon.folly.welly.gen.nz (Richard Parry)
Newsgroups: comp.lang.pascal
Subject: Right.  How do I write doors?
Date: Tue, 01 Sep 92 21:21:00 GMT
Reply-To: parry_r@kosmos.wcc.govt.nz
Distribution: world
Organization: Masterful Enterprises UnLimited.

Nah this aint just another "could someone tell me how to write a door?"
post.  I have heard that Pascals' (my version is 5.5) Write and WriteLn
routines don't use stdio, and so can't be relied upon effectively to
write output for doors that redirect stdio to the com ports.

Any hints on what I should use?  Let's not go too deep here - I'm in a
hurry to get this one fininshed! 8-)

Cheers!

Newsgroups: comp.lang.pascal
From: phshl@wombat.newcastle.edu.au (S.H. LEE (61) 49 21 5566)
Subject: Problem with Stream
Organization: University of Newcastle, AUSTRALIA
Date: Wed, 26 Aug 1992 12:57:58 GMT

Hi guys,
  this is a question about Stream. I am new to tp6 OOP, so please
bear with me. 

I've defined an object TTS which contains a Collection, among other things:

TTS = object(Tdialog)
       data : PCollection;
       ...
       procedure store(var s : TBufStream);
	...

       end;

procedure tts.store(var s : TBufStream);
begin
  TDialog.store(s);
  s.write(num, sizeof(num));
  ...

end;


the questions are, 

1. how do I store the PCollection variable? data^.store(s) ?
2. When I tried to put the TTS object onto a stream in tyhe main 
program, an empty file was created. If I deleted the first line 
TDialog.Store(s) from the store procedure, a file of will be
created properly. Anyone know the reason?

thanks in advance.

Lee.
From: gt8834a@prism.gatech.EDU (William Lang)
Newsgroups: comp.lang.pascal
Subject: GIFs in TP
Date: 29 Aug 92 00:42:00 GMT
Organization: Georgia Institute of Technology


Does anyone have any routines in Turbo Pascal that will read/display
(and maybe even write) 640x480x256 GIF files?  If so, please
respond here or email me, it would be much appreciated.

Thanks,
William
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: How can I see if a file is open?
Organization: Queen's University
Date: Tue, 1 Sep 1992 02:19:19 GMT

In article <29hn7+#.gabriel@netcom.com> gabriel@netcom.com (Gabriel Beccar-Varela) writes:
>   It is very simple: if your file is a textfile you check as follows:
>
>                if TextRec(myfile).mode <> fmClosed then...
>
>    if your file is typed or untyped you say:
>
>                 if FileRec(myfile).mode <> fmClosed then ...
  typo  ----------------------------^^^^^

One warning:  before you've done an assign to myfile, the mode is 
undefined.  It could be fmClosed, fmOpen, or any other value.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: reading Bit mapped fields
Organization: Queen's University
Date: Mon, 31 Aug 1992 12:20:24 GMT

In article <1992Aug31.094457.9196@kth.se> kjell@elixir.e.kth.se (Kjell Rilbe) writes:
>BEGIN
>  FOR I:=0 TO 15 DO
>    BitIsSet[I]:=(CheckBoxResult AND (2 SHL I) > 0);
>END.

That should be "1 SHL I" for the usual bit numbering.  Yours misses the
least significant bit, and numbers the others from 0 to 14.

Duncan Murdoch
Newsgroups: comp.lang.pascal
From: tsv@dbrus.Unify.Com (Tim Vannaman)
Subject: Re: Turbo Pascal -> Borland C++?????
Organization: /usr/lib/news/organization
Date: Mon, 31 Aug 92 14:36:53 GMT

>>> Is it possible to take Turbo Pascal .TPU files and somehow transfer them to
>>> .OBJ files so Borland C++ can link with them????? Is there some other way to
>>> link them with BC?  I'm using TPv6.0 and BCv3.0.
>>> 
>>Well there is suppose to be a way to call C OBJ's from Pascal.  I have yet to
>>get it to work correctly though.  All the sample code that comes with BC 3.0
>>works great...but when I try a simple string alteration it chokes.
>>> 
>Supposively (I too can only get the examples to work) you can link C++ .OBJ
>in with Pascal, but not the other way around. I've never heard of a 
>.TPU -> .OBJ converter. 	 	

Is there some way to make pascal compile to a .obj file?  
  (If it can't, sure would be a nice feature!).

  Tim.
--
Tim Vannaman, Premium Technical Support Engineer   Phone: (916) 928-6433
Unify Corporation, Sacramento, California    Fax: (916) 928-6403
tsv@unify.Com  or  {{ucdavis,csun,lll-crg}!csusac,pyramid,sequent}!unify!tsv
From: caroe@iesd.auc.dk (Jesper Caroee)
Newsgroups: comp.lang.pascal
Subject: Re: Records and strings
Date: 1 Sep 92 10:21:28 GMT
	<1992Aug24.033429.15678@qiclab.scn.rain.com>
	<17aqd5INN73t@matt.ksu.ksu.edu>
Organization: Mathematics and Computer Science, Aalborg University


>I like the cleaner looking boolean assignements.  However, if you recall,
>the Valfieldx() functions took a String as their arguments, and the Arec
>fields are not Strings -- they're things like String[12], etc....that's why
>I bothered with the other stuff...

If you are using Turbo Pascal, there is a compiler-option called: 

   strict var-string checking   (I think)

If you check this off, strings of any length will be compatible, and you
will not have to bother with that problem any more.

--
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: ATURNER@rcnvms.rcn.mass.edu (Alan Turner)
Newsgroups: comp.lang.pascal
Subject: TP?? .lib files
Date: 27 Aug 92 16:47:44 GMT

Date sent: 27-AUG-1992 



I have some circa 1984 .pas files which compile to .lib? files

The earliest version of TP I have is v4.0 which is no help to me on .lib files.
Does anyone know what was the last version of TP to use .lib? 
How do they compare to include or .tpu files? They are supposed to do the right
stuff, I wish I could use them under TP5.5 or TP6.0.... any suggestions?

   +++AT


-=Alan Turner=-                
-=Email: aturner@ecn.mass.edu=-
From: jamesg@syma.sussex.ac.uk (James S Goodlet)
Newsgroups: comp.lang.pascal
Subject: >640k data space for turbo pascal?
Date: 28 Aug 92 12:49:23 GMT
Reply-To: jonm@integ.uucp
Organization: University of Sussex at Brighton

I'm posting this for a friend who doesn't have a newsfeed.  Please reply by
email to him as "jonm@integ.uucp".  Thanks.
James
--
Can someone please tell me the easiest/most cost effective way of
modifying a turbo pascal program so that it can use more than 640K for
its code+data? I know that I will have to use an extender of some sort,
or windows - does anyone have good suggestions? Will Turbo Pascal for
Windows solve this problem? Do I need the windows development kit if I
use Turbo Pascal for Windows?

(sorry if this is a FAQ - I don't get news at my site, so I cannot
access the FAQ lists. Also, I am asking on the behalf of a friend, so
excuse any ignorance on my part).

thanks
Jon.
-- 
School of Cognitive & Computing Sciences,       Talk: +44-(0)273-606755 x2407
University of Sussex,                           JANET: jamesg@uk.ac.susx.cogs
Brighton BN1 9QH,                           UUCP: ...!mcsun!uknet!cogs!jamesg
United Kingdom            Internet: jamesg%cogs.susx.ac.uk@nsfnet-relay.ac.uk
From: S105728@umrvma.umr.edu ( Steve Poulsen)
Newsgroups: comp.lang.pascal
Subject: re: read char from screen
Date: 26 Aug 92 03:23:52 GMT

Have a pointer point to the absolute address of [B800:0000] for color or
[B000:0000] in mono.  Use a record like:

Location = Record
  Character:Byte;
  Attribute:Byte;
End;

Screen = Record
  Memory: Array [1..2000] Of Location;
End;

Then declare a var of Screen absolute.  To read a char just figure
the row and column (start at 0,0)  Screen.Memory[x+y*80].Character
You can also use a better record of double array for x and y.

========================================      ,--,
  Steven P. Poulsen <S105728@UMRVMA>       ,'  '--,
  Student of Electrical Engineering        ---, ,'
  University of Missouri - Rolla            ,','
=======================================    , '
Newsgroups: comp.lang.pascal
Subject: Public Domain Pascal for Suns
From: wallingf@nova.cs.uni.edu ( Eugene Wallingford )
Date: 27 Aug 92 17:02:40 -0500
Organization: Department of Computer Science, Michigan State University
Keywords: Netbios Netware TCP/IP

     We are seeking a public domain version of Pascal to run on our
     Sun SPARCs.  Does anyone know where such a package can be found?

     (We have recently added a number of Sun workstations to our labs
     here and are hoping to teach a section of our Programming I
     course on the new machines!)

     E-mail replies are welcomed...


-- 
~~~~ Eugene Wallingford   ~~~~  Dept of Computer Science     ~~~~
~~~~ wallingf@cs.uni.edu  ~~~~  University of Northern Iowa  ~~~~
From: s902114@minyos.xx.rmit.oz.au (Zen [Stuart Bishop])
Newsgroups: comp.lang.pascal
Subject: Re: TPW 1.5 Manuals
Date: 28 Aug 92 17:08:27 GMT
Organization: RMIT Computer Centre, Melbourne Australia.

chris@gergi.tamu.edu (Chris King) writes:

:)Hey can anyone tell me what manuals where included in tpw 1.5.

:)All I got from Borland was a manual on the Debugger, and one on the
:)resource Workshop.  I expected more.  Did anyone get more?

:)I called customer support and they said that that was all, but the
:)person I talked to didn't seem to know what was suppose to be included,
:)and had a hard time answering my questions.

I got the two you mentioned, plus:
	Users Guide
	Programmers Guide
	Window's Programmers Guide
	Windows Reference.

	I think that is all of them with the correct titles, but you are
	definitely missing some of them. The manuals seem to be identical to the
	TPW 1.0 manuals, except for the resource workshop (which wasn't included
	in TPW 1.0). This might explain what has happened if you upgraded.
	You should still check, as I have never actually seen TPW 1.0 manuals,
	and am just guessing that they are the same.
-- 

 _____                      Two elephants fell off a cliff. Boom Boom.
//  //    __                                                           //
   //    /  \   I\ I                    for a good time call          //
  //    (--     I \I  alias                       zen@rmit.edu.au    //
 //      \__/   I  I  Stuart Bishop                                 //
((_________________________________________________________________//
From: konopka@ils.nwu.edu (Ray Konopka)
Newsgroups: comp.lang.pascal
Subject: Re: TPW 1.5 Manuals
Date: 28 Aug 92 18:07:03 GMT
Article-I.D.: ils.1992Aug28.180703.20481
Organization: The Institute for the Learning Sciences

In article <1992Aug28.120827.7425@minyos.xx.rmit.oz.au> s902114@minyos.xx.rmit.oz.au (Zen [Stuart Bishop]) writes:
>chris@gergi.tamu.edu (Chris King) writes:
>
>:)Hey can anyone tell me what manuals where included in tpw 1.5.
>
>:)All I got from Borland was a manual on the Debugger, and one on the
>:)resource Workshop.  I expected more.  Did anyone get more?
>
>:)I called customer support and they said that that was all, but the
>:)person I talked to didn't seem to know what was suppose to be included,
>:)and had a hard time answering my questions.
>
>I got the two you mentioned, plus:
>	Users Guide
>	Programmers Guide
>	Window's Programmers Guide
>	Windows Reference.
>
>	I think that is all of them with the correct titles, but you are
>	definitely missing some of them. The manuals seem to be identical to the
>	TPW 1.0 manuals, except for the resource workshop (which wasn't included
>	in TPW 1.0). This might explain what has happened if you upgraded.
>	You should still check, as I have never actually seen TPW 1.0 manuals,
>	and am just guessing that they are the same.
>-- 
>

If you purchased TPW 1.5 without upgrading from TPW 1.0, then you
will receive all the manuals of listed above.  However, if you
upgraded, then you will only receive the two new manuals.  The 
other manuals only have minor changes to them.  The changes
are documented in the \TPW\DOC\MANUAL.TPW file.  I also suggest 
looking at \TPW\DOC\MANUAL.RW for some changes to the Resource
Workshop.  The hardcopy manual that was distributed does not
contain information on the new Borland Custom Control options
in RW.  

Hope this clears things up.
Later,
Ray Konopka
konopka@aristotle.ils.nwu.edu
Newsgroups: comp.lang.pascal
From: ul1f@hp850.uni-karlsruhe.de (Volker Dobler)
Subject: Question about tWindow in TVision
Reply-To: ul1f@hp850.uni-karlsruhe.de
Organization: Institut fuer Entscheidungstheorie und Unternehmensforschung Universitaet Karlsruhe (TH)
Date: Wed, 2 Sep 1992 12:24:45 GMT

Hi everybody,

today, i've a question about Turbo Pascal 6.0 Turbo Vision. I tryed to
open a window _without_ a frame.

First, i set the Options to _no_ Frame (Options := Options and not ofFramed;)
within the init-constructor. Nothing happens (the Option ofFramed is never set
in my opinion).

Second, i defined a new object tMyWindow = object(tWindow) with the method
InitFrame.

procedure tMyWindow.InitFrame;
begin
  Frame := nil;
end;

but something happy was the result. I got a frame, but not a full one. The botton
line was not there (only corrupted).

Now, my question. How is the right way to open a Window _without_ a frame.

Thanks, Volker

===================================================================
Volker Dobler, Universitaet Karlsruhe, Deutschland (germany)

ul1f@hp850.uni-karlsruhe.de   oder   ul1f@ibm3090.uni-karlsruhe.de
===================================================================
From: doug@neumann.une.edu.au (Doug Colman)
Newsgroups: comp.lang.pascal
Subject: TPascal Cycloid Plotter - Now at ftp sites
Keywords: GUI SOURCE Cycloid Mathematics Turbo_Pascal ftp
Date: 27 Aug 92 02:25:17 GMT


=========================================================================
"CYCLO" is a mathematical Cycloid Plotter written in Turbo Pascal,
and is available (as CYCLO.ZIP) from the following ftp archives:
=========================================================================

Host capella.eetech.mcgill.ca   (132.206.1.17)
    Location: /wuarchive/mirrors/msdos/plot
Host plaza.aarnet.edu.au   (139.130.4.6)
    Location: /micros/pc/oak/plot
    Location: /micros/pc/simtel-20/plot
Host rigel.acs.oakland.edu   (141.210.10.117)
    Location: /pub/msdos/plot
Host src.doc.ic.ac.uk   (146.169.2.1)
    Location: /computing/systems/ibmpc/wsmr-simtel20.army.mil/plot
    Location: /ibmpc/wsmr-simtel20.army.mil/plot
Host sun0.urz.uni-heidelberg.de   (129.206.100.126)
    Location: /pub/msdos/simtel/plot
Host wuarchive.wustl.edu   (128.252.135.4)
    Location: /mirrors/msdos/plot

CYCLO is a quaint program for generating cycloids (rather like the 
spirograph toy does). It uses a nice Graphical User Interface, and 
was written in Turbo Pascal 6.0 by Doug Colman, Computer Science
Department, University of New England, Armidale, Australia. It is not
endorsed by UNE, but is a personal project. Source code includes seven(7)
Turbo Pascal Units (covering a broad spectrum of Graphical User Interface
Functions and Procedures). Complete CYCLO source is included in a 
source offer. Source comprises about 4360 lines of code and is available 
by sending a modest fee to the author.

Source includes full Menu-Window Interface as used by CYCLO, with Mouse
Support, Dialog Boxes, File Choosers, etc. Written for compatibility with
VGA, EGA, SVGA, CGA, MCGA, EGA64 EGAmono IBM8514, Hercules, ATT400, and
PC3270. Compiler Support: Turbo Pascal Versions 4.0 - 6.0. No warranties
or liabilities are applicable. 

-- DOUG COLMAN. (InterNet: doug@neumann.une.edu.au)
From: bobb@vice.ICO.TEK.COM (Robert Beauchaine)
Newsgroups: comp.lang.pascal
Subject: Re: object pascal to c++?
Date: 31 Aug 92 22:57:43 GMT
Organization: Tektronix, Inc., Beaverton,  OR.

In article <1992Aug31.203708.25199@nmrdc1.nmrdc.nnmc.navy.mil> dsc3jfs@nmrdc1.nmrdc.nnmc.navy.mil (Jim Small) writes:
>
>
>Is there a way to convert TP 6.0 code to Borland C++?
  
  Yes.  Through much pain and anguish on your part, or via a nominal
  fee to someone such as myself.  8:-;

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

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
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: BGI environment variables (was:  Executables)
Organization: Queen's University
Date: Wed, 2 Sep 1992 13:41:40 GMT

In article <H6qgqB1w164w@nzkites.UUCP> foster@nzkites.UUCP (Foster Schucker) writes:
>> Why should I have to put up with 640x200x2 (or 320x200x4) when my hardware
>> can do 640x200x16 *and* I have the BGI to do it? Folks with superVGA
>> probably feel the same.
>> 
>> And we'd *all* like to be able to eliminate the space used by the unused
>> BGI drivers. 
>> 
>> Oh yeah, Borland should have "suggested" an environment variable to point
>> to the directory with all your BGI files. <sigh>
>
>I love it, what a great idea!!  I'm going to write to all the authors 
>of the programs and suggest that they look at the "BGI" environment
>var and use that.  

I agree - it's a great idea.  But don't we need two variables?  One to name
a special driver, and one to give the directory for BGI files in general?

I'd suggest names, but I think it's better to pick something that's already 
in common use.  I've never released or much used graphics programs, so it's 
up to those of you who do:  what variables are currently in use for these 
purposes?  Is there already a consensus of what the names should be?

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: kjell@elixir.e.kth.se (Kjell Rilbe)
Subject: Re: reading Bit mapped fields
Organization: Dept. of EE, Royal Institute of Technology, Stockholm, Sweden
Date: Mon, 31 Aug 1992 09:44:57 GMT

In article <1992Aug31.094135.245@lincoln.ac.nz> cachoo@lincoln.ac.nz writes:
>
>  var
>    I : Integer;
>    CheckBoxResult : Word;
>    BitIsSet : Array[0..15] of Boolean;
>  begin
>    {get CheckBoxResult from user}
>    for I := 0 to 15 do
>      if CheckBoxResult AND I = I then BitIsSet[I] := True
>      else BitIsSet[I] := False;
>  end;
>
>As I understand TP instructions, this code should return the boolean 
>equivalent of the binary value of CheckBoxResult. But it does not work! 
>What am I doing wrong?
>
Well, Oscar, I usually do it this way:

BEGIN
  FOR I:=0 TO 15 DO
    BitIsSet[I]:=(CheckBoxResult AND (2 SHL I) > 0);
END.

Note the direct boolean assignment replacing the if statement.
The 2 SHL I calculates the mask for the I:th bit, and after AND:ing
the result will be =0 if the bit was clear, and >0 if the bit was set.

Hope it helped!

/Kjell

-- 
-----------------------------------------------------------------------------
! Kjell Rilbe           ! Love is not about getting everything on the list, !
! kjell@elixir.e.kth.se ! it's about accepting the things that aren't on    !
!                       ! the list!             - Stewart Markowitz, LA Law !