HDTenEightyP/NetNews huggingface dataset:
From: sirosh@cs.utexas.edu (Joseph Sirosh)
Newsgroups: comp.lang.pascal
Subject: Is this legal - why/why not?
Date: 28 Jul 1992 13:59:14 -0500
Organization: CS Dept, University of Texas at Austin
NNTP-Posting-Host: muleshoe.cs.utexas.edu
Keywords: Pascal Syntax, Semantics

I have two questions.

1. The following declaration for an enumerated type is legal.
    Type Used = (Integer, Char, Boolean);

even though Integer, Char, Boolean etc. are names of predefined types.
This works on Think Pascal on the Mac.

However, the following declaration does not work, though Pascal definition
does not say anything against it.

	Type Used2 = (Integer);

The error message from the compiler is 'This does not make sense'.
Why? Why is this declaration illegal?

2. The second question is similar. How come the following declaration
does not work,
 Var ar1: array[Integer] of char;

but something Var ar2: array[char] of char; does? I can understand 
arguments of memory limitations, but the error message given by the
compiler seems to imply syntactic error.

Joseph
From: S105728@umrvma.umr.edu ( Steve Poulsen)
Newsgroups: comp.lang.pascal
Subject: Re readkey
Date: 29 Jul 92 18:38:21 GMT

There is a problem with the readkey example.  If you use readkey and check
for a key, then you lose any further checks.  Here's how I do it:

Var
  ch1,ch2:char;

Begin
  ch1:=ReadKey;
  Case ch1 of
    32:{space}
    46:{whatever}
     0:Begin
         ch2:=ReadKey;
         Case ch Of
           'K':{arrow}
           ...
         End;
  Else
   ...
  End;

This always works good for me.
From: dxc@netcom.com (Dixie Chan)
Newsgroups: comp.lang.pascal
Subject: need pascal source code for line editor
Summary: need pascal source code for line editor program
Keywords: pascal source code, line editor, editor
Date: 23 Jul 92 18:06:30 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest)

I need Pascal source code for a line editor program similar to
MS DOS edlin, if one exists.  Would appreciate information or
source.  /dc
Newsgroups: comp.lang.pascal
From: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: Re: how long is a clock cycle (was source for DELAY procedure)?
Organization: Queen's University, Kingston, Canada
Date: Thu, 30 Jul 1992 16:23:37 GMT

In article <Bs7Hv8.Bqz@news.cso.uiuc.edu> amead@s.psych.uiuc.edu (Alan Mead) writes:
[ Description of Delay replacement that keeps the keyboard buffer
flushed.]
>
>Also, the delay will be longer than period milliseconds by number*<the
>time it takes to execute FlushKBD>.
>
>Which all seems to bear on the value of shorter.  I think that the
>BIGger I make it, the less trouble I accrue from the other points.
>
>And all this stuff would seem to be processor (even machine!)
>specific.  Different machines will execute FlushKBD at different
>speeds.
>
>Anyone have any suggestions?  

Why use Delay here?  If you've got a wait that's so long that someone
could conceivably fill up the keyboard buffer, it seems likely that 55
msec accuracy would be good enough.  Just poll the system clock, and you
can get that.  This will have the advantage of working pretty well 
regardless of changes to cpu speed, or other processes in a
multitasker.

A nice Delay() replacement might use the system clock for long delays,
and CRT.Delay for short ones.

Anyone know where in the executable code
>I can find the Delay procedure's initialization data?

Trace through a call to Delay, and you'll see it referring to a constant
in the data segment.  Trace through the initialization code for the CRT
unit (the second far call in the program "uses crt; begin end.") and
you'll see it calibrate and set that value.

Duncan Murdoch
From: stvlin04@uctvax.uct.ac.za
Newsgroups: comp.lang.pascal
Subject: Another Simple?? TP Question
Date: 21 Jul 92 13:47:59 GMT
Organization: University of Cape Town

Could anyone tell me how to get the keyboard to recognise the key in the center
of the keypad (i.e. the '5' key) when NUMLOCK is off. Or is it just a non - key
as far as pacsal is concerned?
From: jer7@ns1.cc.lehigh.edu (JOEL ERIC RUDY)
Newsgroups: comp.lang.pascal
Subject: Mouse
Date: 31 Jul 92 03:05:09 GMT
Organization: Lehigh University

Please excuse me if this is an FAQ.  I would like help (i.e. code, names of
magazine articles, etc. ) that can handle a mouse in Turbo Pascal.  I am using
TP 5.0, and can't find anything in the manuals on how to work with the mouse
at all.  Thanks in advance.

Joel Rudy
From: albert@cs.uq.oz.au (Albert Ng)
Newsgroups: comp.lang.pascal
Subject: TEGL 3.0
Summary: Tegl 3.0
Keywords: tegl
Date: 28 Jul 92 04:11:02 GMT
Reply-To: albert@cs.uq.oz.au

Is there anyone got a update of the TEGL V.3.0 yet?
I got their mail a week ago, about this new version.
They said the manual is a lot better ( one for each
module ) and it supports protected mode now.

I just wanted to know if it is any better than the v2

Thanks

Albert
BIT Hons
U.of.Q.
Newsgroups: comp.lang.pascal
From: ts@uwasa.fi (Timo Salmi)
Subject: Re: {T+}?
Organization: University of Vaasa, Finland
Date: Mon, 27 Jul 1992 04:17:07 GMT

In article <76549@ut-emx.uucp> baylor@ccwf.cc.utexas.edu (Baylor) writes:
>	What is {T+}?
>	I can't seem to find it in the manuals or online help, and the
>compiler flags it as an unknown compiler directive.
>	It's used in a TSR shell i downloaded from wuarchive.
>	I'm using T6

This is a guess as far as {T+} is concerned, but the general line
holds.  Some of the compiler switches have been changed with the
changing TP versions.  Especially there was many chages from TP 3 to
TP 4.0.  Much material that is on the archive sites stem from the
old days.  Take a look at your downloads file dates in case they
give a hint.  If it is TP 3 code, there often are some telltale
signs anyway in form of needing the interrupts much more.

..................................................................
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: friesenda@skyfox.usask.ca
Subject: RE: I need mouse code
Organization: University of Saskatchewan
Date: Fri, 31 Jul 1992 02:03:52 GMT

In a previous article, bobb@vice.ICO.TEK.COM (Bob Beauchaine) wrote:

>    Are there good PD mouse units for TP in existence?  I have an
>    interrupt driven mouse routine that I wrote that supports the
>    entirity of the MS mouse standard (whatever that was when I
>    wrote the unit).  It works well for me, and I'll release it if
>    there's truly a need and I'm not duplicating someone else's
>    work.

Sounds like a damn fine idea.  I'd love to have a look at it (and
I'm sure many others would too).

>Bob Beauchaine bobb@vice.ICO.TEK.COM 

>Real friends don't let friends use UNIX.

I get a kick out of this each time I see it.  :)



-----------------------------------------------------------------------------
Darryl Friesen          |  "The vet let me keep them... they're my testicles"
Univ. of Saskatchewan   |   - Far Side cartoon: dog talking to his buddy.
friesenda@sask.usask.ca |
From: misra@scout.ksu.ksu.edu (Boo!)
Newsgroups: comp.lang.pascal
Subject: Standard pascal question...
Date: 27 Jul 1992 12:36:31 -0500
Organization: Kansas State University
NNTP-Posting-Host: scout.ksu.ksu.edu

	I hope some of you can help me out here. I am writting some sorting
routines and i would like to time how long it takes the program to sort
Is there any function in TP5.5 that will allow me to do this? Like 
print the time of start and finish..?? Thanks.. alot.. take care.. 



Newsgroups: comp.lang.pascal
From: arivero@mothra.cns.syr.edu (Angelo Rivero)
Subject: Re: Functions and Procedures as Parameters
Organization: Syracuse University, Syracuse, NY
Date: Wed, 22 Jul 92 23:40:44 EDT

In article <1992Jul21.050043.7238@usenet.ins.cwru.edu> bx304@cleveland.Freenet.Edu (Jeff Epler) writes:
>
>In a previous article, husak@ux1.cso.uiuc.edu (Stephen R. Husak) says:
>
>>I've been trying to implement the following in TP5.5... Could someone
>>either clue me in or tell me if it is possible.
>>
>>I want to pass a function into another function:
>>
>>eg --	function First(a,b: real;
>>		       function test(x:integer):integer);
>>	
>>	{ rest of function follows }
Im working in 6.0 so im not positive this applies to 5.5.
You simply use the function as a variable in the parameters. So you would
just replace that function test(x:integer):integer part with t:integer, and
pass test as the value of t.  Quick example of this:
Function five:integer;
begin
five:=5;
end;
Function writefive(f:integer);
begin
write(f);
end;
BEGIN
writefive(five);
end.
From: J_SCHULL@acc.haverford.edu (Jonathan Schull)
Newsgroups: comp.lang.pascal
Subject: code Scrambler?
Date: 26 Jul 92 22:49:21 GMT


I'm developing a proprietary .TPU tool.  I can't distribute the
source code, and want to make it difficult for hackers to be able
to reconstruct it by examining the .TPU file.  Are there
utilities out there for scrambling variable names, before
compiling final source code, so that there are no recognizable
variable names available used as landmarks in the TPU?


Other approaches to suggest?
Organization: Valencia University (Universitat de Valencia)   SPAIN
Date: Tuesday, 21 Jul 1992 12:36:06 EST
From: <LOPEZJ@EVALUN11.BITNET>
Newsgroups: comp.lang.pascal
Subject: I need help with TVISION

  Hello!
     I am doing a program using TurboVision (Turbo Pascal 6.0) but I have
 one problem:
     -How can I do that StatusLine show help messages (like IDE of Turbo
 Pascal). I think that I would use the Hint function but I don't know do
 it.
     -Are there any place in the network where I could take some good
 examples about TURBOVISION?
                          Thank you very much!
From: baylor@ccwf.cc.utexas.edu (Baylor)
Newsgroups: comp.lang.pascal
Subject: {T+}?
Date: 25 Jul 92 00:06:55 GMT
Organization: The University of Texas at Austin, Austin TX


	What is {T+}?
	I can't seem to find it in the manuals or online help, and the
compiler flags it as an unknown compiler directive.
	It's used in a TSR shell i downloaded from wuarchive.
	I'm using T6

-- 
-----------------------------------------------------------------------
Baylor Wetzel    baylor@cc.utexas.edu        Hang Tyson 
Free Leonard Peltier
-----------------------------------------------------------------------
From: usr3947a@tso.uc.edu (Kenneth Wronkiewicz)
Newsgroups: comp.lang.pascal
Subject: Re: merging virtual screens?
Date: 28 Jul 92 16:59:34 GMT

is it just me or does everyone here use IBM.... is there a way to implement a
virtual playfield with ORCA/Pascal on the apple //gs?
From: raj@phys.ksu.edu (raj)
Newsgroups: comp.lang.pascal
Subject: Duntenmann's Column in DDJ 10/91
Date: 26 Jul 1992 19:38:41 GMT
Organization: Kansas State University
NNTP-Posting-Host: bohr.phys.ksu.edu
Keywords: Hcalc, units, DDJ

I was
ii
I was trying to compile Jeff Duntemann's HCALC program that
appeared in DDJ last year. The program uses a unit written
by Allen Bauer to handle some string functions called StrFmt.
I got the rest of the source code from ftp.funet.fi in the
msdos/magazines/ddj directory. However it won't compile without
the StrFmt unit - does anyone have this? 

--Thanks
--
S. Raj Chaudhury			|
Dept. of Physics    			|  raj@phys.ksu.edu
Kansas State University			|
Manhattan, KS 66506			|
Newsgroups: comp.lang.pascal
From: reagan@hiyall.enet.dec.com (John R. Reagan)
Subject: Re: Is this legal - why/why not?
Organization: Digital Equipment Corporation
Date: Thu, 30 Jul 1992 18:36:43 GMT


In article <Bs6L75.BDK@knot.ccs.queensu.ca>, dmurdoch@QueensU.CA (Duncan Murdoch) writes...
> 
>Is that really illegal, or did you make a typo?  It compiles just as
>you'd expect in Turbo Pascal:  "foo" becomes the standard 16 bit integer
>type, "integer" becomes the subrange 1..10.  TP processes the declarations
>strictly sequentially; I had thought standard Pascal did it that way
>too.

Nope, I didn't make a typo.  The Pascal standard doesn't discuss
"sequential" anything.  The "INTEGER = 1..10" is a defining occurrance
of the identifier INTEGER for the entire region (the region goes backwards
to the beginning of the block).  This definition of INTEGER retroactively
changes the previous use of INTEGER in the definition of FOO.  You now
have a "use before declare" situation and thats illegal.

Of course, noone claims that Turbo Pascal is standards conforming...

---
John Reagan
Digital Equipment Corporation
reagan@hiyall.enet.dec.com
Disclaimer:  The opinions and statements expressed by me are not
             necessarily those of Digital Equipment Corporation.
---
From: ahall@nmsu.edu (HALL)
Newsgroups: comp.lang.pascal
Subject: Arrow keys in TP6.0
Date: 21 Jul 92 04:31:19 GMT
Organization: New Mexico State University

Somebosy was asking how to scan for arrow keys in TP6.0. ( I'm sorry I don't remember who it was)

Here's an example code:

ch := readkey;
if ch = #0 then
begin
  ch := readkey;
  if ch = #72 then uparrow
  else if ch = #75 then leftarrow
  else if ch = #77 then rightarrow
  else if ch = #80 then downarrow;
end;

I use similar procedures in "menubar" style menus.  Hope this helps.
Newsgroups: comp.lang.pascal
From: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: Re: code Scrambler?
Organization: Queen's University, Kingston, Canada
Date: Mon, 27 Jul 1992 18:20:36 GMT

In article <31537@adm.brl.mil> J_SCHULL@acc.haverford.edu (Jonathan Schull) writes:
>
>I'm developing a proprietary .TPU tool.  I can't distribute the
>source code, and want to make it difficult for hackers to be able
>to reconstruct it by examining the .TPU file.  Are there
>utilities out there for scrambling variable names, before
>compiling final source code, so that there are no recognizable
>variable names available used as landmarks in the TPU?
>
>Other approaches to suggest?

There aren't any names in a .TPU file that aren't necessary, if you
compile it with the $D-,L- options.  The only names you'll get are the
names of interfaced symbols and the names of units which the .TPU uses.
I don't think you'd want to scramble either of those.

BTW, if you don't make source code available for your unit, there will
be a large body of users (including me) who won't use it.  The nature of
the .TPU design is such that it's necessarily version-specific; if I
don't have the source code for all third-party units, I'm stuck in a
particular TP version.  This doesn't mean you should give away source
code, but please make it optionally available.  

One thing that would be useful for people in your position would be a
source scrambler, that stripped comments and white space, and changed
local names, but I've never seen one.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: Re: Constant objects in TP 6.0
Organization: Queen's University, Kingston, Canada
Date: Fri, 31 Jul 1992 14:34:32 GMT

In article <23036@oasys.dt.navy.mil> roth@oasys.dt.navy.mil (Pete Roth) writes:
>But isn't that what the "unit initialization section" is all about?
>Such being the case, the declaration should be
>
>UNIT unitname ;
>INTERFACE
>USES whatever;
>
>VAR		{ <- much preferred, since the object will most likely change }
>   descend : TDescend;
>
>IMPLEMENTATION
>{ etc. }
>
>BEGIN
>   descend.Init(...) ;
>END	.
>
>So far the only reason for "constant" objects that I can think of
>is the "initialization". What else would you use them for ?

No, I don't want to do that.  In this case, the unit contains a
collection of about a dozen sets of coefficients for wavelet transforms.
The typical caller would only want one set; if they all got initialized
then they'd all be linked in, regardless of whether they were needed or
not.  Here that means about 4K of wasted space, which isn't a
huge amount, but in other cases it could mean a lot more.

What I'm aiming for is the ability to have the caller say:

  Transform.init(CubicCoeffs);

and have only the cubic coefficients linked in.  This is possible if the
coefficients are defined in separate Const blocks; it would also be
possible if "CubicCoeffs" were a function instead of a constant.  I'll 
probably change to that, since constant objects are getting quite messy 
to deal with.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: ae24@iamk4516.mathematik.uni-karlsruhe.de (Peter Januschke)
Subject: Re: C to Pascal Translator
Organization: University of Karlsruhe, Germany
X-Newsreader: Tin 1.1 PL4
Date: Thu, 23 Jul 1992 13:55:31 GMT
From: frederm@prism.CS.ORST.EDU (Michael Frederick)
Newsgroups: comp.lang.pascal
Subject: OOPs!
Date: 30 Jul 92 09:18:27 GMT
Article-I.D.: CS.1992Jul30.091827.11160
Organization: Oregon State University, Computer Science Dept.

In my last article I wrote

if p^ & 1 = 1 then left shift pushed

I used 'C's bitwise and there... It should be

if p^ and 1 = 1 then ....
if p^ and 2 = 2 then .....


sorry.

Mike
Newsgroups: comp.lang.pascal
From: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: Re: Is this legal - why/why not?
Organization: Queen's University, Kingston, Canada
Date: Thu, 30 Jul 1992 02:49:53 GMT

In article <1992Jul29.201359.4297@nntpd.lkg.dec.com> reagan@hiyall.enet.dec.com (John R. Reagan) writes:
>type foo = integer;
>     integer = 1..10;
>
>is illegal since integer was used for 2 things in the same scope.

Is that really illegal, or did you make a typo?  It compiles just as
you'd expect in Turbo Pascal:  "foo" becomes the standard 16 bit integer
type, "integer" becomes the subrange 1..10.  TP processes the declarations
strictly sequentially; I had thought standard Pascal did it that way
too.

Of course, if you meant "foo = (integer)" in the first line,
that's different:  it's defining "integer" to be a constant, and you can't
then define "integer" to be a type as well.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: phfrom@nyx.uni-konstanz.de (Hartmut Frommert)
Subject: Re: Constants in an Object
Organization: Dept. of Physics, University of Constance
Date: Fri, 24 Jul 1992 15:27:50 GMT

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) writes:

>phfrom@nyx.uni-konstanz.de (Hartmut Frommert) writes:
[..]
HF>>const
HF>>  MyObject: TMyObject = (345);
[..]
DM>   MyObject: TMyObject = (Myfield: 345);

Oops-- I was too sloppy, thanx for correction.

>The constructor call doesn't allocate memory, it fills in the VMT field.
>The compiler does that for you in a constant object, so no constructor
>call is needed.  This is discussed in Chapter 5 of the Programmer's Guide.

Thanx for this hint. I confused with the particular constructor 
*TObject.Init*, sorry.

--
 Hartmut Frommert, LS Dehnen, Physics, | E-Mail: <phfrom@dknkurz1.bitnet>
 Univ of Constance, P.O.Box 55 60,     |     or  <phfrom@nyx.uni-konstanz.de>
 D-W-7750 Konstanz, Germany   | + SAVE THE WHALES ! BOYCOTT NORWAY !        +
 Phone: +49-(0)7531-88-3747   | + Whales R intelligent. Whale killers not.  +
+ Whale killing is murder. Eating whales is cannibalism. Eat whale killers. +
From: leonard@qiclab.scn.rain.com (Leonard Erickson)
Newsgroups: comp.lang.pascal
Subject: Re: Another Simple?? TP Question
Date: 22 Jul 92 00:06:50 GMT
Article-I.D.: qiclab.1992Jul22.000650.12204
Reply-To: 70465.203@compuserve.com
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.

stvlin04@uctvax.uct.ac.za writes:

>Could anyone tell me how to get the keyboard to recognise the key in the center
>of the keypad (i.e. the '5' key) when NUMLOCK is off. Or is it just a non - key
>as far as pacsal is concerned?

If TP doesn't recognize it, then neither does your BIOS! That leaves 
directly reading the scan codes as the only way to detect it. And that
gets *really* ugly. 

There are a few drivers floating around that let you define keycodes for
non-supported keys. I use one called ENHKBD to enable the F11 & f12 keys
on a keyboard attached to an XT.

-- 
Leonard Erickson		      leonard@qiclab.scn.rain.com
CIS: [70465,203]			 70465.203@compuserve.com
FIDO:   1:105/56	 Leonard.Erickson@f56.n105.z1.fidonet.org
(The CIS address is checked daily. The others infrequently)
From: chip@ac.dal.ca
Newsgroups: comp.lang.pascal
Subject: Saving VGA screen graphic screen to memory.
Date: 30 Jul 92 23:50:35 -0300
Organization: Dalhousie University, Halifax, Nova Scotia, Canada

Hi all,

  I have a question about saving a VGA graphics screen.  Like how you
  do it?? :)

I know a 640x480*16 screen is 150k large.  I also know that the VGA memory
segment is A000:0000.  However, the segment is only 64k.  I assume that some
sort of virtual memory is used to store all the information (in layers??
bit planes?)  But I do not know how to access it.

I have heard a little about the CRTC controler? But nothing good.

I have also heard of a book called "Programmer's Guide to PC and PS/2 Video
Systems" (microsoft press)  I have looked locally for this book but haven't 
found it.

Can anyone help me save a VGA screen...Any code would be appricated, either
in TP, ASM, C, or BASIC(ick!)

Please EMAIL me at CHIP@AC.DAL.CA 
Thanks ... Mark Klaamas
From: drvsim01@uctvax.uct.ac.za (Simon Driver)
Newsgroups: comp.lang.pascal
Subject: Re: I need help with TVISION (StatusLine)dir
Date: 23 Jul 92 11:00:20 GMT
Distribution: comp.lang.pascal
Organization: University of Cape Town

In article <54794@mentor.cc.purdue.edu>, 
  pf@bilbo.bio.purdue.edu (Paul Furbacher) writes:

>> >      -How can I do that StatusLine show help messages (like IDE of Turbo
>> >  Pascal). I think that I would use the Hint function but I don't know do
>> >  it.

> The interpretation by Simon Driver of the original request is an 
> interesting one.  I got the impression that the author wanted
> to know how to implement a hinted statusline.

Replies to a similar question by myself and the initial question shown above, 
indicate a contradiction in the question.  The problem being that the request
is for a help message "like the IDE of Turbo Pascal", followed immediately by a
request for help on the hint function.

>  Wouldn't it be more 
> standard to put up a "Wait" window with some kind of moving
> indicator to show that the system is still actively working on
> the task at hand? 

The question of "standards" with regard Turbo Vision is an interesting one. I
would suppose that the implementation of the IDE itself is a standard in
itself. However, as you mention, a "Wait" window might be more correct. If one
looks at the way Borland have set things up, they use the statusline for
messages, current status and help, and a "Wait" window for processes that can
be interupted or need to be monitored as is the case in Compiler window.

> It's not too hard to implement this as a descendent of 
> TDialog with "Flags := Flags and not wfClose", one "panic"
> button, and a modified handle event which loops until the
> process is done, and checks for the appropriate "panic"
> event.  The descendent could have a fancy draw method which,
> depending on the fraction of the process completed, would 
> write a bar of appropriate length, and/or a rotating symbol between
> the following:   \   |   -   /   to show activity.

It would be easier to implement a descendent of the TWindow, which would allow
greater configuration with regard colours/layout. 

Regards,
        Simon.

-- 
*****************************************************************
\*****                                                          *\      
 *****   Simon Driver                                           **
 \****                                                          **\
  ****   InterNet : DRVSIM01@UCTVAX.UCT.AC.ZA                   ***   
  \***   FidoNet  : 5:7102/120.1                                ***\   
   ***              Simon.Driver@p1.f120.n7102.z5.fidonet.org   ****
   \**                                                          ****\
    **   Comment  : Pascal Programmers Do It With Indentation   *****
    \*                                                          *****\
     *****************************************************************