HDTenEightyP/NetNews huggingface dataset:
From: pf@bilbo.bio.purdue.edu (Paul Furbacher)
Newsgroups: comp.lang.pascal
Subject: Re: I need help with TVISION (StatusLine)
Date: 22 Jul 92 21:33:46 GMT
Distribution: comp.lang.pascal
Organization: Purdue University

In article <1992Jul22.111504.202068@uctvax.uct.ac.za>, 
   drvsim01@uctvax.uct.ac.za (Simon Driver) writes:

 in response to an article  which asks: 

> In article below <LOPEZJ@EVALUN11.BITNET> 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.
> 
> I asked this question a while back and got a few replies (thank you) but all
> involved the hint. You just place a global variable in your hint function and
> this takes care of this, but you get the following problem.
> 
> F1 Help | Please wait while loading C:\TP6\TEST.TXT
> 
> This doesn't help much because if it is a large file, or it is being formated,
> the user might think (s)he can press F1 to get help during the loading process.
[ explanation of hack deleted ]

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.  Either way, 
Simon Driver discusses the implementation of "wait" messages 
in the statusline which to me doesn't seem terribly kosher,
even though the IDE handles it this way.  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?  Such a "wait window" would deactivate all
events except an "abort"/"cancel" process keyboard or mouse
event.  Then there wouldn't be the problem inherent in using
the status line and having it interpret a request for help, as
described above.  The hack wouldn't be necessary, unless one
considers the following description a hack in itself.  (Maybe
everything is a hack in one sense or another, no?)

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.  

Comments?

PF
Newsgroups: comp.lang.pascal
From: ekeland@boeygen.uio.no (Anders Ekeland)
Subject: Turbo Debugger 1.5 destroy screen 
Organization: University of Oslo, Norway
Date: Wed, 29 Jul 1992 07:55:51 GMT

I have an IBM PS2 Mod. 90 486XP (sometimes called Mod. 90 AH5), Dos 5.0 and a
8515 monitor with an XGA video card.

Problem: when I call the debugger from within (or from Windows/DOS) the screen 
         is destroyed, bits and pieces of menues everywhere and blinking char's
         all over the place. 

Solutions tried: Changed windows setup (VGA, VGA ver. 3.0, XGA,
         8514/a) in various combinations with settings in TDW.INI

Surprised: I am a little bit surprised that XGA is not mentioned in 
         readme.tdw.

Any help or hint is very welcome.

(PS: I know that this is not strictly about the language Pascal, but 
neither the Borland nor the IBM representative here  in Norway have 
been able to solve this problem)
Newsgroups: comp.lang.pascal
From: donaldc@ug.cs.dal.ca (Donald Chisholm)
Subject: Overlay question
Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada
Date: Fri, 24 Jul 1992 13:49:36 GMT

	I have a overlay question for anyone out there who is familar
with Turbo Pascal 6.0.
	What I'd like to know is if I have a small unit that calls a huge
unit (both overlayed) will the overlay manager handle the reloading of
the smaller unit if it got over written by the larger one?
	What happens to the global variables they share?  Will the smaller
unit be able to access any changes made to global variables while it was
swaped out? Is there anything I should be careful of when doing this sort
of overlayed unit calling another overlayed unit?

Any help would be great,

Don

Newsgroups: comp.lang.pascal
From: vlaurent@cactus.org (Vince Laurent)
Subject: Dice Rolling Poser
Organization: Capital Area Central Texas UNIX Society, Austin, Tx
Date: Tue, 28 Jul 1992 17:06:03 GMT

I am trying to figure out some dice algorithms and am stumped. Here
is a sample of what I am trying to do, though I would like to be
able to do it for any multiple of dice. I will do my example with
6 dice:
 
You roll 6 dice and are alowed to sort them from highest to lowest.
The idea is to get the longest straight possible.  For example:
 
1 2 3 4 5 6 = six in a row    note that the x's are numbers which can
1 2 3 4 5 x = five in a row   NOT come up from an earlier straight.
x 2 3 4 5 6 = five in a row   For example, the x in the 5 in a row
1 2 3 4 x x = four in a row   first one) can not be a 6 else it would
x 2 3 4 5 x = four in a row   be a straight of length 6.  Also, there
x x 3 4 5 6 = four in a row   can be multiple straights. For example,
1 2 3 x x x = three in a row  a straight of length 4 and a straight
x 2 3 4 x x = three in a row  of length 2 can co-exist as well as 3
x x 3 4 5 x = three in a row  straights of length 2 (eg: 121212).
x x x 4 5 6 = three in a row
1 2 x x x x = two in a row
x 2 3 x x x = two in a row
x x 3 4 x x = two in a row
x x x 4 5 x = two in a row
x x x x 5 6 = two in a row
 
The question is: how many combinations of 6 in a row are there? 5 in
a row? and so on.  Remember, a roll of 123411 is a straight of length
4 and therefore can not be counted in anything else (eg: straight of
length three 123xxx or x234xxx or straights of length two). Also, I
am trying to keep this generic so if someone uses 4-4sided dice or 6-
6 sided dice, and so on.
 
I have managed to write a program that rolls 6 dice and then sorts them
but I cna't figure out an algorithm to count what I am looking for.
 
Any help would be GREATLY appreciated.  NO - THIS IS NOT FOR CLASS, I
am working on a board game!
 
Vince Laurent
| FidoNet 1:382/10 | vlaurnet@cactus.org | RimeNet->MAH |

p.s. I posted it here because I do most of programming in pascal and would
like to get some code to do this for me.


-- 
Vince Laurent 
Internet  vlaurent@cactus.org
Connect America BBS 1:382/10
From: gt1827a@prism.gatech.EDU (david daniell)
Newsgroups: comp.lang.pascal
Subject: Alsys Ada to Turbo Pascal 6.0?
Date: 22 Jul 92 15:01:32 GMT
Followup-To: gt1827a@prism.gatech.edu
Organization: Georgia Institute of Technology

*** This is a copy of an article originally posted to Comp.lang.ada ***

As part of a project that I will be working on in the near future, there
will be a need to interface new Alsys Ada routines to an old Turbo Pascal 6.0
program shell.  The Turbo Pascal shell will act as a user interface to the 
Ada code.  

I am using Alsys Ada Software Development Environment for FirstAda, version
4.4.2.  I am aware that Turbo Pascal does not strongly support mixed-language
programming.  Alsys Ada supports interface calls to Assembler and Microsoft C.
I have considered building a "bridge" between Ada and Pascal using C (such as
Turbo C, which is -- I hope -- compatible with the Microsoft implementation).

Any advice would be greatly appreciated.  



Newsgroups: comp.lang.pascal
From: nbw1@quads.uchicago.edu 
Subject: Re: TPW-displaying bitmaps(transparent).
Reply-To: nbw1@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Thu, 30 Jul 1992 19:18:33 GMT

Do a loop drawing each pixel if its not black is too slow? Not quite,
I'd gather that thats the way they did it, since it IS the only way to 
do it.  

The way I fixed it is to make a couple direct pixel routines, then do the
loop, --- works just as fast.

nbw1@quads.uchicago.edu
N Ben Wiliams
From: raj@phys.ksu.edu (raj)
Newsgroups: comp.lang.pascal
Subject: Re: Graphics Printing
Date: 30 Jul 1992 13:54:47 GMT
Organization: Kansas State University
Distribution: na
NNTP-Posting-Host: compton.phys.ksu.edu

In <1992Jul29.210650.3895@qiclab.scn.rain.com> leonard@qiclab.scn.rain.com (Leonard Erickson) writes:

>lemek@eecae.msu.edu (John P. Lemek) writes:

>>Does anybody know of a way to output a graphics screen from TP6 without 
>>pressing the PrtScr key.  I'm working on a project where there won't be access
>>to a keyboard, rather the input interface will be a touch screen.  I'm trying
>>to use an HP 500C Color Deskjet, so I would like to be able to output color
>>graphics.

 May I mention Frank Van der Hulst(sp?) PGRAF130 unit available at all the
usual hangouts of TP stuff...works nicely on my dot-matrix printer however
I am not sure color is supported...


--
S. Raj Chaudhury			|
Dept. of Physics    			|  raj@phys.ksu.edu
Kansas State University			|
Manhattan, KS 66506			|
Newsgroups: comp.lang.pascal
From: death@acca.nmsu.edu (The Grimm Reaper)
Subject: Re: TPW question
Organization: New Mexico State University
X-Newsreader: Tin 1.1 PL4
Distribution: world,local
Date: Wed, 22 Jul 1992 09:59:27 GMT

Just don't forget to set all these attributes BEFORE calling InitWinCrt.
From: roth@oasys.dt.navy.mil (Pete Roth)
Newsgroups: comp.lang.pascal
Subject: Re: Constant objects in TP 6.0
Date: 31 Jul 92 12:33:43 GMT
Reply-To: roth@oasys.dt.navy.mil (Pete Roth)
Organization: The David Taylor Model Basin

Newsgroups: comp.lang.pascal
Subject: Re: Constant objects in TP 6.0
Expires: 
Reply-To: roth@oasys.dt.navy.mil (Pete Roth)
Followup-To: 
Organization: The David Taylor Model Basin

In comp.lang.pascal, dmurdoch@QueensU.CA (Duncan Murdoch) writes:
>I've just discovered a problem (I'm not sure if I'd call it a bug, but a
>design inconsistency) in Turbo Pascal 6.0's handling of constant objects.

[ "bug" description deleted ]

>I'd suggest the following alternative syntax for constant objects:
>
>const	{ corrected }
>  descend : TDescend.Init(...);
>
>where Init is a constructor.  This would be executed just before the
>initialization section of the unit it occured in.  The constructor could
>set any private fields and generally initialize the object properly.

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 ?

regards, pete
- - - - - - - - - - - - - - - - - - - - - - - - - -
Peter N Roth      roth@oasys.dt.navy.mil
"Never argue with someone who buys ink by the barrel." - Daniel Janal.

regards, pete
- - - - - - - - - - - - - - - - - - - - - - - - - -
Peter N Roth      roth@oasys.dt.navy.mil
"Never argue with someone who buys ink by the barrel." - Daniel Janal.
Newsgroups: comp.lang.pascal
From: wct@po.CWRU.Edu (William C. Thompson)
Subject: Re: Sparse matrices (comparison of methods)
Reply-To: wct@po.CWRU.Edu (William C. Thompson)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Wed, 22 Jul 92 23:44:24 GMT


Before I had proposed that each node contain four pointers, left, right,
down, and up, and you enter each row/column through one of two doubly 
linked lists.  Each node stores its position in the array.  This has
the advantage of being able to process elements in either order, up
or down, very quickly.  Unfortunately, each cell requires 20 bytes,
which can add up quickly.  500 elements (not unheard od) would need
10K in pointers alone.  Not to mention the 10 bytes needed for each
row and column.  At worst, this array would use 5K of pointers.  At
best, a little more than 220 bytes.  15K isn't catastrophic for 500
elements.  Any non-trivial application probably has data that dwarves
the 15K.  The main problem is speed.  If you are accessing elements
at the end of lists, it could take a while.

Another suggestion has been to use doubly-linked lists for each row
and have a list pointers into the rows.  This uses half as much memory
(potentially), but you lose the ability to go in each direction with
ease and speed.

You could also use trees instead of linked lists.  The speed is there,
but going from element to a nearby element can be awkward.  Going in
both directions isn't there either.

As usual, it depends on your application what you decide.
-- 

                        [currently under construction]


Xref: sparky comp.lang.pascal:4556 comp.sys.ibm.pc.programmer:284 alt.msdos.programmer:2069
From: woodc@jacobs.CS.ORST.EDU (Major Havok)
Newsgroups: comp.lang.pascal,comp.sys.ibm.pc.programmer,alt.msdos.programmer
Subject: Hi-rez timer/Graphics routines.
Date: 26 Jul 92 01:43:36 GMT
Article-I.D.: leela.1992Jul26.014336.9808
Organization: Computer Science Outreach Services - Oregon State University


  First of all, I would like to say that I have created a Turbo Pascal unit
(with source code included) for giving your Turbo Pascal program access to
a timer with greater resolution than 55 milliseconds. The file is called
"qwktimer.zip" and is available on garbo.uwasa.fi in the directory
/pc/turbopas. This unit will give you access to a system timer with 
microsecond precision. The default system timer experiences a clock tick
every 55 millesonds (or 18.2 times per second). With QwkTimer, in theory
you can increase the system timer to a resolution of about 900 nanoseconds
without altering the time of day contained in your system clock. QwkTimer
is freeware. You may distribute it as much as you like, but please do not
distribute it in modified form. Feel free to modify the source code in any
way you like for your own private use. Possible applications for QwkTimer
are:

  - Measuring the elapsed time between events with microsecond precision.

  - Forcing a delay between events with microsecond precision.

  - Setting up a high speed output buffer. For instance, you may set up
    an output buffer for a 9600 baud modem so that your program doesn't
    have to constantly monitor the modem (in this case a timing rate of
    greater than 960 clock ticks per second should be used).

  There are proably many more applications, but these are just a few that I
can think of at this moment. If you have any comments or questions, please
email me at woodc@jacobs.cs.orst.edu. 



  Now, for the second part of this posting. Would anyone out there have
any FAST graphics routines for drawing a line between two points and for
plotting a pixel fast? It should be written in assembly language and should
be easily incorperated into a Turbo Pascal program (either linked to the
pascal program, or included in the source code itself using the ASM 
feature of Turbo Pascal 6.0). This will be for use on a super VGA card,
but all I really need is a method for calculating the slope needed for
drawing a line very fast since I already know how to perform bank switching
on my SVGA card. Any help would be appreciated.

-- 
+---------------------------+----------------------------------------------+
| Chris Wood                |  "If you can't convince them, confuse them." |
| woodc@jacobs.cs.orst.edu  |                                   -unknown   |
+---------------------------+----------------------------------------------+
Newsgroups: comp.lang.pascal
From: jordan@aero.org (Larry M. Jordan)
Subject: Re: Is this legal - why/why not?
Organization: The Aerospace Corporation
Date: Thu, 30 Jul 1992 18:27:27 GMT

In article <1992Jul29.201359.4297@nntpd.lkg.dec.com> reagan@hiyall.enet.dec.com (John R. Reagan) writes:
[stuff deleted]
>
>There must be bugs in the compilers you use.  There is nothing
>wrong with redefining predeclared identifiers.  They aren't special
>in this regard.  You just can't use the same identifier for two
>things in the same scope.  For example,
>
>type foo = integer;
>     integer = 1..10;
>
>is illegal since integer was used for 2 things in the same scope.
>

Looks legal to me.  Works fine on Sun Pascal.  The first integer is
from an 'enclosing' scope.  The second integer 'masks' the integer from
the enclosing scope.  The two integer's are used in the same block, 
but each has a different scope!  According to Ghezzi and Jazayeri,
"Programming Language Concepts":

  The scope of a variable is the range of program instructions over
  which the variable is known.

(This definition applies to types and constants as well).

The above example does not violate the scope rule.

--Larry %)

Xref: sparky comp.lang.pascal:4536 rec.games.programmer:2967
From: baylor@ccwf.cc.utexas.edu (Baylor)
Newsgroups: comp.lang.pascal,rec.games.programmer
Subject: merging virtual screens?
Date: 24 Jul 92 03:44:02 GMT
Followup-To: comp.lang.pascal
Organization: The University of Texas at Austin, Austin TX


	Quick question for those who understand me or have played a couple
of games by apogee and others:
	How do you make a set portion of a graphics screen scroll
and have the backdrop stay constant? It's done on commander keen
and cosmos cosmic adventure (don't know any non-games that do it).
I thought i had heard it was done by merging two screens, having a
backdrop screen (like a mountain scene) that never moves (except scroll
horiz with the rest of the game/program) and a foreground screen
where all the action is that can scroll up or down.
	Maybe you have a seperate page where the sprites move and 
move that to the visual screen quickly, knowing which parts of the
screen to overwrite and which to leave alone. Or maybe i'm way off
(these games use fairly large virtual screens - can't imagine
two pages of them).
	I don't necc. need code, just a general idea of what to look
at or what they're doing.
	Also, if anyone knows a better newsgroup for ibm graphics
questions (alt.headache) please let me know.
	Oh yeah, this is in turbo pas 6, but really it all comes
down to assembler.

-- 
-----------------------------------------------------------------------
Baylor Wetzel    baylor@cc.utexas.edu        Hang Tyson 
Free Leonard Peltier
-----------------------------------------------------------------------
From: amead@s.psych.uiuc.edu (Alan Mead)
Newsgroups: comp.lang.pascal
Subject: TurboPascal: Programming the IBM PC & XT
Date: 22 Jul 92 02:38:55 GMT
Organization: UIUC Department of Psychology

I have to make a program work on some older IBM computers (PCs and XTs).

Are there any capabilities that Turbo Pascal will loose on those early
machines?  Like sound, delay, GetTime, etc?  Thanks.

-alan
Newsgroups: comp.lang.pascal
From: dmurdoch@watstat.waterloo.edu (Duncan Murdoch)
Subject: Re: TurboPascal: Programming the IBM PC & XT
Reply-To: dmurdoch@mast.queensu.ca
Organization: Queen's University 
Date: Wed, 22 Jul 1992 13:42:35 GMT

In article <BrrrCw.E4s@news.cso.uiuc.edu> amead@s.psych.uiuc.edu (Alan Mead) writes:
>I have to make a program work on some older IBM computers (PCs and XTs).
>
>Are there any capabilities that Turbo Pascal will loose on those early
>machines?  Like sound, delay, GetTime, etc?  Thanks.

Those are all fine.  The only thing I can remember that you have to watch out
for are floating point errors:  if your 8087 coprocessor tries to signal an
error, TP is likely to lock up.  On some machines you can avoid this by enabling
the NMI interrupt, but not on all.

Oh, and as John Zitterkopf said, $G+ code won't work.  You won't get any sort
of error message if you try to run it, you'll just lock up when you
get messed up by the lack of some instruction.

Duncan Murdoch
dmurdoch@mast.queensu.ca
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: Wed, 29 Jul 1992 21:09:55 GMT


In article <1992Jul29.072408.23090@monu6.cc.monash.edu.au>, ins894r@aurora.cc.monash.edu.au (Aaron Wigley [Wigs]) writes...
>sirosh@cs.utexas.edu (Joseph Sirosh) writes:
>: 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.
> 
1)

type used = (integer,char,boolean);

is legal

2)

type used = (integer)

is legal

3) 

type bigone = array [integer] of integer;

is legal.

There must be bugs in the compilers you use.  There is nothing
wrong with redefining predeclared identifiers.  They aren't special
in this regard.  You just can't use the same identifier for two
things in the same scope.  For example,

type foo = integer;
     integer = 1..10;

is illegal since integer was used for 2 things in the same scope.

---
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.
---
Newsgroups: comp.lang.pascal
Subject: Re: TP 6.0: Can I use a spreadsheet?
From: dennis_c@kosmos.wcc.govt.nz
Date: Tue, 21 Jul 1992 09:43:36 GMT
Reply-To: dennis_c@kosmos.wcc.govt.nz
Organization: Wellington City Council, Wgtn, NZ

In article <13260@ns-mx.uiowa.edu>, boyap@herky.cs.uiowa.edu (Venkata Boyapalli) writes:
>
>  Could some one tell me, whether it is possible to interface
>a spreadsheet (like: LOTUS 1-2-3) module with Turbo pascal 6.0
>code? 
>
>I want to take advantage of spreadsheet facilities from a
>turbo pascal program.  Any spreadsheet is fine.
>
>Thanks in advance,
>
>-Venkat

TP6.0 comes a small but workable spreadsheet called TCELL as one of
its demo programmes.

Chris Dennis                                      dennis_c@kosmos.wcc.govt.nz
Wellington, New Zealand
Newsgroups: comp.lang.pascal
From: reagan@hiyall.enet.dec.com (John R. Reagan)
Subject: Re: Standard pascal question...
Organization: Digital Equipment Corporation
Date: Mon, 27 Jul 1992 14:28:02 GMT


In article <3763@blue.cis.pitt.edu.UUCP>, bjorh1+@pitt.edu (Reidar Bjorhovde) writes...
>Hi.  I am writing a program in standard pascal and I need to use a
>function like the 'copy' function in Turbo Pascal, where a substring is
>returned from a string.
> 
>Is there a function in Standard Pascal that can do this?
> 
You didn't say which standard you are concerned with?

For the 1983 unextended Pascal (aka "classic" Pascal), no there is not a
builtin routine that does what you want.  For the 1989 Extended Pascal
standard, see the SUBSTR ("substring") predeclared routine.

---
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.
---
Newsgroups: comp.lang.pascal
From: jbm@hal.trl.OZ.AU (Jacques Guy)
Subject: Frontier Pascal: any users out there?
Organization: Telecom Research Labs, Melbourne, Australia
Date: Wed, 29 Jul 1992 03:47:17 GMT


I am not even (shame!) certain of the name. Only remember
having seen a fleeting mention of a Pascal compiler
that allows arrays the size of your memory, 8 Mbytes and
more. The name, if I remember correctly, was Frontier
Software Pascal. I'd be grateful for comments from
users, if it has objects, and how it compares with
Turbo Pascal.

Treat my request with commiseration, please. This is
Australia here, and we get things often very late,
sometimes even never.

Thank you in advance.

Newsgroups: comp.lang.pascal