HDTenEightyP/NetNews huggingface dataset:
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Calling Local Procedures - Problems
Organization: Queen's University
Date: Tue, 22 Dec 1992 03:03:31 GMT

In TP, the only difference between a local procedure and a regular 
procedure is that the local procedure has a hidden word-sized parameter 
giving the stack frame base (BP) of the enclosing procedure.  It's 
possible to fake this, but a little tricky because typecasting doesn't 
work on procedural types.  Here's some sample code:

type
  TVector = array[1..100] of real;    { This is a sample declaration }

  TLocalProc = procedure(var v:real;frame:word);
  { This is the declaration for a local procedure that has declaration 
    procedure(var v:real); far;
  }

function CallerFrame: Word;
{ Returns the BP value of the caller's stack frame; used for passing
  local procedures and functions around. Taken from Borland's Outline
  unit. }
inline(
  $8B/$46/$00           { MOV   AX,[BP] }
  );

Procedure VForEach(proc:pointer;x:TVector);
{ Calls a local far procedure Proc once for each element of x, like
  the TCollection.ForEach procedure.  The declaration for proc must
  be
     procedure Proc(var v:real); far;
  if it's a local procedure, or
     procedure Proc(var v:real;dummy:word); far;
  if it's a global procedure.  If the value of v is modified, the
  corresponding element of x will be updated.
}
var
  doit : TLocalProc absolute proc;
  i : integer;
begin
  for i:=1 to 100 do
    doit(x[i], CallerFrame);
end;

{ Here's sample code to use VForEach: }

procedure ShiftAllElements(var x:TVector; shift:real);

  procedure ShiftOne(var v:real); far;
  begin
    v := v + shift;
  end;

begin
  VForEach(@ShiftOne, x);
end;

var
  x : TVector;
  i : integer;
begin
  for i:=1 to 100 do
    x[i] := i;             { initialize x to 1..100 }
  ShiftAllElements(x, 4);  { Add 4 to all elements }
end.

I haven't tested this code, so it may contain typos, but it's based on 
tested code from my vectors unit.  I've simplified it; in the real 
unit the vectors are objects that can be of any size that'll fit in memory 
or on disk, not just 100 elements. 

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: rmuir@hmcvax.claremont.edu
Subject: Pascal compilers for DEC Ultrix ??
Organization: Harvey Mudd College
Date: 29 Dec 92 05:49:48 PST

PD Pascal compiler for DEC Ultrix.  Recommendations??

I am working with a group of high school students who are conducting research
in knot theory (a field of study in mathematical topology).  Because they are
familiar with Turbo Pascal, they are interested in securing a good (and
cheap (read public domain)) pascal compiler for a DECstation 5000/25 running
Ultrix.  I have found a number of compilers through the archie archives, but
no one I know has any recommendations.  We are particularly interested in 
speed and compatibility, especially with Turbo Pascal (Macintosh and IBM) and
Pascal on the Cray XMP.

I would be more than happy to compile any responses I receive and repost them
to this news group.  Email can be addressed to the above-stated adddress or
rmuir@chs.cusd.claremont.edu

Thanks in advance.

					Robs Muir

Newsgroups: comp.lang.pascal
From: jeroenp@rulfc1.LeidenUniv.nl (Jeroen W. Pluimers)
Subject: Re: Suggestion for BP 7.1
Organization: Dept. FMC, Gorlaeus Labs, Leiden University, The Netherlands
Date: Tue, 29 Dec 92 00:55:48 GMT

In article <Bzz3v8.FzL@netnews.jhuapl.edu> mfein@netnews.jhuapl.edu (Feinstein Matthew R. F1B x6554 ) writes:
>Here's a modest proposal for BP "7.1" : give us a complete set of
>predefined selectors covering the whole lowest megabyte, like
>Seg0000, Seg1000, Seg2000, ... , SegF000.  This would be real useful
>for those of us with non-standard memory mapped devices.

Why that?  It is soooo easy to make themselves with DPMI and/or
SetSelectorBase....

--
jeroen                             voice: +31-2522-20908 (19:00-23:00 UTC)
                                   snail: P.O. Box 266
jeroenp@rulfc1.LeidenUniv.nl              2170 AG Sassenheim
jeroen_pluimers@f256.n281.z2.fidonet.org  The Netherlands
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: How forgiving is TURBO pascal concerning strings?
Organization: Queen's University
Date: Wed, 30 Dec 1992 14:10:43 GMT

In article <HEMSTREE.92Dec29091253@mddchh.mddchh.fc.hp.com> hemstree@mddchh.fc.hp.com (Charles H. Hemstreet IV) writes:
>
>With the following brief description below what is the expected result?
>Will Turbo pass by the comparison without an error?  I am also
>assuming that teststr[0] contains the value of the size of the string.

>teststr : string[100];
>testchar : char;
>
>teststr := 'the is not a big string';
>testchar := 'a';
>
>if testchar = teststr[0] then make a milkshake
>else milk the cow first

There wouldn't be a syntax error on the test.  Strictly speaking, 
"teststr[0]" is not the length of the string, because it's a char, not a 
number.  "Ord(teststr[0])" is the length.  There's no problem comparing 
chars, so you won't get any error.

Duncan Murdoch
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Distributing TPUs
Organization: Queen's University
Date: Mon, 21 Dec 1992 15:24:36 GMT

In article <1992Dec21.135420.10280@discus.technion.ac.il> s2942275@techst02.technion.ac.il (Yaniv Golan) writes:
>
>I want to distribute a TP unit which uses a second unit. I do not want
>to distribute the second unit with it, only the first TPU. Can it be done ?

It's not possible to compile a program unless all the units it uses and all 
the units they use (and so on recursively) are available.  Code isn't copied 
into a .TPU when it uses another one, only a pointer saying where to find it.

This means that if you want to distribute a .TPU file, it's completely 
useless to anyone who doesn't have all the units it depends on.  It's also 
likely to be useless to anyone who has different versions of 
those; that's why a System unit replacement can't add anything, since it 
would make all units compiled against the old System incompatible.

You should also realize that there are now something like 9 different 
flavours of .TPU file around that are all mutually incompatible (TP 4, 5, 
5.5, 6, 7, TPW 1 & 1.5, BP 7 protected, BP 7 windows) because of references 
to different System units and because of changes to the format.  (I think 
there are 5 different formats, but 9 different System and/or support 
unit versions.)  There are also TP-compatible compilers like Stony Brook's 
Pascal+ and Microsoft's Quick Pascal that can't use .TPU files at all. You'd 
give your program a much wider audience by distributing it in source form, 
perhaps without giving away source to external .OBJ files.


Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: ghost@wam.umd.edu ()
Subject: Object problem in TP6
Organization: Workstations at Maryland, University of Maryland, College Park
Distribution: usa
Date: Thu, 31 Dec 1992 00:27:03 GMT


Hi, out there i am writing a game object for Turbo Pascal 6.0
and everything was working fine deriveing other objects etc. and
now for  some STRANGE reason a series of methods i use in a derived object
don't 'register'..........when i try to compile the unit with the derived
object i get an undeclared identifier error! i don't get it it was working
fine until i added a virtual procedure to the game objec, which comipled
ok after that....
basically i have these procedures in the game object definition

leftclic
leftdoubleclick
rightclick
rightdoubleclick

(these are all virtual..not that it would make too much diff.)

now in the derived object i do :

  if leftclick then.......

i get the undeclared method error at this line and at any line that uses
the aforementioned procedures......

i didn't declare any methods in the game object to be private..so i have no
clue as to what could be wrong
any ideas ?

thank you, comp.lang.pascal :)

Ghost@La.Villa.Strangiato
.
Newsgroups: comp.lang.pascal
Subject: TPW 1.5 Problem with making a TDlgWindow Iconic
From: Carl Fago <CDF1@psuvm.psu.edu>
Date: Sun, 3 Jan 1993 20:33:33 EST
Organization: Penn State University

I'm having a problem with a program I am having.  I have the following code
for the main window (TDlgWindow type) of a program but when I minimize it
I don't get the neat little icon I developed for it...

PROCEDURE TASLWindow.GetWindowCLass (VAR AWndClass : TWndClass);
BEGIN
  TDlgWindow.GetWindowClass (AWndClass);
  AWndClass.hIcon := LoadIcon(HInstance, AName);
END;

Now, AName is passed to the Init procedure for TASLWindow from the
application's InitMainWindow procedure.  Also, I have checked to ensure that
the value for AName is identical to the name of the icon in the loaded
resource.

When I try to minimize the program I get the upper left hand portion of the
TDlgWindow.

Is there anything else that I can look for to see what I am doing wrong?

Thanks in advance for any help!

 *-=Carl=-*  INTERNET - cdf1@psuvm.psu.edu | In battle, you can do   |
             GEnie - C.FAGO1               | everything right...     |
 Carl Fago   State College, PA             | and _still_ lose!       |

Newsgroups: comp.lang.pascal
From: jeffbyrn@mp.cs.niu.edu (Jeff Byrne)
Subject: Re: Calling Local Procedures - SOLVED -
Organization: Northern Illinois University
Date: Tue, 22 Dec 1992 06:08:52 GMT

Hi,
  Well my problem is solved thanks to Duncan Murdoch.  He explained that
a local procedure differs from a regular procedure only by the addition
of a hidden word sized parameter containing the calling procedure's [BP].

This is easy to fake by changing the procedure type declaration:
Type
  LocalMethodType = Procedure (P : PTestObj); { Procedure Type }
becomes:
  LocalMethodType = Procedure (P : PTestObj; BFrame : Word);
                                         {   ^- This gets [BP] }
The solution I tried before worked (sort of) because it was pushing the
correct number onto the stack.  However, they were in the wrong order.

Thanks again to Duncan.  If anyone is interested in a fixed version of
my simple test program just send me some e-mail.
Happy Holidays -
- Jeff
jeff@mp.cs.niu.edu
jeff@art.niu.edu
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Distributing TPUs
Organization: Queen's University
Date: Tue, 29 Dec 1992 02:05:57 GMT

In article <765338d8368876t211@witsend.uucp> "D. C. Sessions" <dcs@witsend.tnet.com> writes:
>In <1992Dec27.022633.14853@beaver.cs.washington.edu>, andrewb@lynx.cs.washington.edu (Andrew Berg)  wrote:
># 
># Does anyone know what the motivation for not ever having any backward com-
># patibility between any of the TPU formats?  It seems like it would be a useful
># thing.

It's a trade-off.  .TPU files contain some optimizations that make compiling 
and linking go much faster than it could with .OBJ files; these mean upward 
compatibility is essentially impossible.

>  A while back I asked whether anyone had cooked up a TPU converter.
>  Seems like the sort of thing that might even be useful, don't it?
>
>  Well, folk?

I'd suspect that conversion among TP 6/TPW 1.0/TPW 1.5 would be possible, as 
would conversion among the various BP 7 types, because there are only 2 
formats involved.  I think the formats are close enough that it would even 
be feasible to convert between the two types, certainly from BP 7 backwards 
if not TP 6 forwards.

But:  It would be a lot of work.  It's not something that would be 
very interesting, and it's not something that would make anyone any money.  
It solves a problem that doesn't exist for most people, since the 
alternative of keeping source code to all third party units is pretty much 
standard practice.  It's not certain to succeed, since there may be changes 
to the RTL between versions that just can't be converted (e.g. the heap 
manager changes frequently; code that works closely with it needs rewriting, 
not just recompiling).

I've been tempted to try it sometimes, but the problems above have held me 
back.  I'd be happy to give advice to anyone who wants to give it a try, 
though.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: jlee@ece.orst.edu (Jim Lee)
Newsgroups: comp.lang.pascal
Subject: Subscribe
Date: 2 Jan 93 20:22:56 GMT

subscribe jlee@ece.orst.edu
Newsgroups: comp.lang.pascal
From: ts@uwasa.fi (Timo Salmi)
Subject: Re: 64K segments
Organization: University of Vaasa, Finland
Date: Tue, 22 Dec 1992 21:37:18 GMT

In article <1992Dec22.195752.6805@purelogic.cs.uwlax.edu> butte_ms@serine.uwlax.edu (Mike S. Butterbrodt S92) writes:
>
>Probably a FAQ.   Was mentioned not long ago that there are way (painfull or  
>otherwise) to get around the 64K segment limit in BP 7.0.  Ok, so how.  I would  
>appreciate a few tips on this most annoying feature of an otherwise nifty  
>language.

Should you mean how to use arrays larger than 64K then it can be
found in a FAQ with code and all:

 118710 Dec 19 18:56 garbo.uwasa.fi:/pc/ts/tsfaq31.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". 

   All the best, Timo

..................................................................
Prof. Timo Salmi      Co-moderator of comp.archives.msdos.announce
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: curzon@trooa.enet.dec.com
Subject: WINPRO/3
Date: Tue, 29 Dec 92 12:29:52 PST
X-Received: by usenet.pa.dec.com; id AA14957; Tue, 29 Dec 92 12:29:57 -0800
X-Received: by enet-gw.pa.dec.com; id AA19049; Tue, 29 Dec 92 12:26:36 -0800
X-Received: from trooa.enet; by decwrl.enet; Tue, 29 Dec 92 12:29:52 PST
X-To: comp.lang.pascal.usenet
X-Cc: curzon@trooa.enet.dec.com
X-Apparently-To: comp.lang.pascal.usenet


Soliciting any opinions & reports on WINPRO/3?  New releases and features?  
[ This is an application generator for Borland Pascal Windows ]

                                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
From: bobbe@vice.ICO.TEK.COM (Robert Beauchaine)
Newsgroups: comp.lang.pascal
Subject: Mouse
Date: 30 Dec 92 20:43:37 GMT
Organization: Tektronix Inc., Beaverton, Or.


  I've been polishing up my complete mouse unit for TP, and I've
  encountered some problems I can't explain.

  I've installed a hardware interrupt mouse event handler as
  outlined by Microsoft using int $33, function $12.  I trap all
  mouse button presses and mouse movements.  All works splendidly in
  text mode.  When writing a graphics demo using the BGI, however, I
  occassionally lose mouse events, particularly when I
  simultaneously move and click the mouse.  I don't have the runtime
  library for any version of TP, so could someone in the know tell
  me if the BGI library is masking off interrupts or doing any other
  kind of shady activities that would cause the problem?  Debugging
  this kind of program is always problematic, given it's interrupt
  nature, and I'm  having difficulty narrowing down the range of
  possible causes.

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

Bob Beauchaine bobbe@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: sorokin@ps1.iaee.tuwien.ac.at (Zhenja)
Subject: Re: Turbo Vision Keys?
Organization: Inst. for General Electrics & Electronics, TU Vienna
Date: Wed, 23 Dec 1992 01:43:46 GMT

In article <1992Dec22.092853.327@lincoln.ac.nz> cachoo@lincoln.ac.nz writes:

>> So why the heck are they not using ENTER for 'Next Field'?????
>> 
>> I just *HATE* when TAB moves to next field and ENTER accepts the stuff
>> by mistake when you really wanted next field!!!!

>Yes! I Thoroughly agree with you. Even after using this type of interface
>for many thousands of hours, I still make the mistake ocassionaly. I
>wonder how this standard came to be and why. There doesn't seem to be any
>logical reason. Is it because MS Windows uses it?
>  Oscar Cacho, Lincoln University, New Zealand

As far as I remember, Norton Commander used the same idea. NC was de-facto 
standard DOS shell years before MS even thought of Windows.
This doesn't mean I like it, but it's like language: do you like rules in 
your language?

Merry Christmas and Happy New Year to everybody!
From: ts@uwasa.fi (Timo Salmi)
Newsgroups: comp.lang.pascal
Subject: Re: powers in TURBO pascal
Date: 1 Jan 93 10:14:40 GMT
Organization: University of Vaasa, Finland

In article <1993Jan1.004310.9816@ac.dal.ca> chip@ac.dal.ca writes:
>  EXP(Power * LN(Base));
>That's the messy code....

No, that is the simple, ungeneral code.  The messy general source
code can be found in
 118710 Dec 19 18:56 garbo.uwasa.fi:/pc/ts/tsfaq31.zip

..................................................................
Prof. Timo Salmi      Co-moderator of comp.archives.msdos.announce
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: villa@ghost.dsi.unimi.it (Max .Vilas. Villa)
Subject: TP & MATH
Organization: Computer Science Dep. - Milan University
Date: Fri, 1 Jan 1993 12:31:35 GMT

Hello, I need to use more advanced mathematical functions in TP. Does
anyone khows if and where are availables libraries or units to perform
this task ? Thanx in advance...
Plese send me e-mail at: villa@ghost.dsi.unimi.it.

						Vilas

--
P.S.: HNY !!!!
Newsgroups: comp.lang.pascal
From: leonard@qiclab.scn.rain.com (Leonard Erickson)
Subject: Re: GRAPHIC MOUSE CURSOR IN T
Reply-To: Leonard.Erickson@f51.n105.z1.fidonet.org
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
Date: Mon, 28 Dec 1992 18:19:02 GMT

vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael) writes:

>I extremely highly suspect this is, say, easily, done by dynamically
>(i.e.
>whenever you move the mouse) redefining the character set :
>When showing the mouse, replace the (up to) four characters (partially)
>covered by the mouse cursor by, say     #255 #254
>                                        #253 #252
>then redefine the characters #252 to #255 to display... those characters
>that where under the mouse... PLUS a mouse cursor !
>That of course implies that you've got no other #252..#255 characters on
>the screen (try #0..#3).
>If you have never seen one thousand of mouse cursors moving
>simultaneously
>on your screen, just try to edit a binary file with PC-Tools 7....!!!

You overlook the fact that in text mode, you can have 8 or so character
sets available for use. Pick the highests numbered one and define your
mouse cursor characters *there*. That way, since the default font is
what gets picked for everything else, you can get away with all kinds
of things.

-- 
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)
Newsgroups: comp.lang.pascal
Subject: Re: GRAPHIC MOUSE CURSOR IN T
From: cscmd@lux.latrobe.edu.au (Mitch Davis)
Date: Sat, 2 Jan 1993 09:49:14 GMT
Organization: La Trobe University

In article <1992Dec28.181902.25155@qiclab.scn.rain.com> Leonard.Erickson@f51.n105.z1.fidonet.org writes:
>vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael) writes:
>>then redefine the characters #252 to #255 to display... those characters
>>that where under the mouse... PLUS a mouse cursor !
>
>You overlook the fact that in text mode, you can have 8 or so character
>sets available for use.

I admit I didn't know this.  I know that on the EGA and VGA you can
sacrifice the intensity bit to indicate one of TWO character pages, but
I didn't know that there were any more than two.

Can you illustrate with some code please?

Mitch.
From: apj6796@tamsun.tamu.edu (Albert Paul Jimenez III)
Newsgroups: comp.lang.pascal
Subject: Need help with TurboProfession v5.0
Date: 22 Dec 1992 11:31:06 -0600
Organization: Texas A&M University, College Station, TX
Distribution: world
NNTP-Posting-Host: tamsun.tamu.edu

To all those in Pascal land, I hope you can help...

A while back (2-3 years) I purchased Turbo Professional v5.0 from Turbo Power Software... It was t the time (Pascal v5.0-5.5) an almost necessary tool to remove drudge work from coding... well, I have since gotten TP 6.0 & when I try to recompile, I can't... errors in lots of different units, etc... Now my question:
  Does anyone know how I can contackt TurboPower? I tried to Tech Help # in the front of the manual, but its been disconnected and the LD operator found no TurboPower Software in Scotts valley area... anyone have a current #?

  Failing that, do any of *you* know what needs to be done in order to recompile? I'm minimally experienced with compiler directives & such and suspect that it may be as simple as defining one someplace or commenting some out... 


Please help!

--Paul

PS: Please reply thru email since I am not a regular reader of this newsgroup (so many messages, so little time.... sigh)

Thanks & Happy Holidays!

-- 
   Reachable As:     | Advice, help, or hints taken are done so | Friends don't
SilverEagle@tamu.edu | at your own risk and may reflect poorly  |  let friends
 (aka Paul Jimenez)  | on your better judgement. --The Mgmt.    |    use VMS.
From: astoner@mcis.messiah.edu
Newsgroups: comp.lang.pascal
Subject: Using streams
Date: 31 Dec 92 15:32:49 GMT

Hello all,
   I just recently had some assistance on converting an object I had to
one that was streamable.  I also asked my assistor (D. Elson) if he could
explain a little bit about streams.  Which he did very well.  His
description was enough to get me to try to learn how to use them.  I now
have a small sample program with my newly converted object.  The
questions that I have are:
1.  Is there a way to tell what type of object is being read from a stream?
I know the stream has to know because it uses the Object ID to call the
correct Get method, but I haven't been able to determine if my main program
can tell.  I thought I had read at one place in the manual that you needed
to keep track of the order things were put on the stream but haven't been
able to find it again.
2.  Is there a way to conditionally uses a different type of stream in a
different environment?  For example, my machine has about 5 meg of EMS,
so an EMS streams is nice.  But if I take it down the hall the computer
may not have any EMS so a disk based stream would be the solution.  Is
there a way to determine what type of stream to use in these situations?
Maybe using compiler directives or something.

Thanks,

.......................................................................

Item Subject: signature
--------------------------------------------------------------------------------
  Allen E. Stoner                       Internet: astoner@mcis.messiah.edu
  Academic Application Programmer                 Messiah College
  Voice:  (717)766-2511 ext. 7109       Fax:  (717)691-6002
--------------------------------------------------------------------------------
From: Gerhard.Kroemer@Schiller-Hm.nsn.ni.schule.de (Gerhard Kroemer)
Organization: Schiller-Gymnasium Hameln, Niedersaechsisches Schulnetz
Sender: GateServer@nsn.ni.schule.de