HDTenEightyP/NetNews huggingface dataset:
From: s1949782@titan.ucc.umass.edu (Matthew Crocker)
Subject: HELP, TVision Questions
Organization: University of Massachusetts, Amherst
Date: Tue, 28 Jul 1992 12:54:27 GMT

Am I just totaly missing this or what?

Here's my problem

 I have a Dialog box (tDialog) stored in a Resource file.

 The dialog has 2 inputlines and 2 listboxes (with scroll bars)

 When I Get the dialog from the resource I want to SetData
 for the inputlines and the listboxes.  here's what I do.

 DialogData : Record
               FileName : String[127];
	       SearchString : String[80];
 	       Available  : pStringCollection;
	       Selected	  : pStringCollection;
	      End;

Procedure MSCDialogType.Init;

Begin
 DialogData.FileName := 'Events.Dat';
 DialogData.SearchString := '';
 DialogData.Available := New(pStringCollection,Init(100,10));
 DialogData.Selected := New(pStringCollection,Init(100,10));

 SetData(DialogData);  <--- it crashes here;
End;
	
Procedure ShowDIalog;
Var
 D : pMSCDialogType;

Begin
 D := pMSCDIalogType(RezFile.Get('Dialog1'));
 If ValidView(D) Then
  Begin
   D^.Init;
   Desktop^.ExecView(D); <- If  I Take out the SetData above it crashes
   D^.Done;                  Here.
  End;
End;
  
When I run this Under TurboDebuuger 2.51 it just hangs,
When I run it under OS/2 Dos Box it causes OS/2 to freak and close the 
application.

I think I know whats happening, The SetData is giving the two ListBox's the 
wrong Pointer and the ListBox.SetData is going on forever on the wrong 
pointers.

What I want to know is HOW to setdata for a dialog like this

I have tried setting the DialogData.Available & Selected := Nil but that
doesn't help either.  

The order that its in the DialogData Record is the same order that they
were inserted into the DIalog before it was resourced.

This also doesn't work if I create the Dialog and the SetData (no Resource)

Like I said Am I missing something?  I have RTM but It doesn't help
it should work they way I'm doing it right?

advTHANKSance

-Matt

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Matthew Crocker
s1949782@titan.ucc.umass.edu
crocker@elux3.cs.ucc.umass.edu
From: rclotfel@matt.ksu.ksu.edu (Red Dragon)
Newsgroups: comp.lang.pascal
Subject: Re: Help me
Date: 21 Jul 1992 11:49:00 -0500
Organization: Kansas State University
Distribution: usa
NNTP-Posting-Host: matt.ksu.ksu.edu

ahall@nmsu.edu (HALL) writes:

>Help, everytime I run this I get a run time error 162 on the erase function
>This program is being run on an ibm clone 386 using turbo 6.0. 
>B
>s
>Procedure writevault;
> 
>var
>  inf, outf : vaultfile;
>  v : vaulttype;

>begin
> cfg.path := 'c:\slbbs\sltpua\';
>  assign ( inf, cfg.path + 'pdvault.dat' );
>  assign ( outf, cfg.path + 'pdtemp.dat' );
>  reset ( inf );
>  rewrite ( outf );
> 
>  close ( inf );
s
>>please forgive the gibberish there, im new to this editor.
the reason this is screwing up is because you are closeing the file
that you are trying to erase, the file must be open in order to erase
it.
j  erase ( inf );
>  close ( outf );
>  rename ( outf, cfg.path + 'pdvault.dat' );
>end;
> 

>If I switch and erase the outf then 
>the error goes away.

of course, outf is still open, you dont close a file when you erase it.
>B
>(except of course for the rename error since outf has been deleted. )d

>ahall@nmsu.edu
Newsgroups: comp.lang.pascal
From: mudrc@uxa.ecn.bgu.edu (Daniel R. Crowson)
Subject: ANSI with Turbo Pascal 6.0
Organization: Educational Computing Network
Date: Wed, 29 Jul 1992 13:30:21 GMT

  I'm interested in how to add ANSI graphics to programs with TP.
Please post any examples or just how to do it!

Thanks,

Dan  ->  mudrc@uxa.ecn.bgu.edu

Newsgroups: comp.lang.pascal
From: dmurdoch@watstat.waterloo.edu (Duncan Murdoch)
Subject: Re: Variable record files
Reply-To: dmurdoch@mast.queensu.ca
Organization: Queen's University
Date: Wed, 22 Jul 1992 17:39:39 GMT

In article <1992Jul22.131206.51534@ns1.cc.lehigh.edu> bsc0@ns1.cc.lehigh.edu (BRIAN STUART COSTELLO) writes:
>If anyone knows of any routines that would allow variable record sizes in a
>file, please tell me.
>
>What's I'd like is the ability to enter in text of any size (up to, say, 20k),
>and when I wrote it to disk, I don't want the record to take up 20k if I
>entered in 1k's worth.

Use streams.  You can either put the data in an object, and use the
Put and Get methods from TStream, or just Read and Write it if you don't
want to bother with objects.  

A poor alternative, which you'll be stuck with if you're not using TP 6+
(5.5+, actually, if you trust demo code), is to use BlockRead and BlockWrite.
Streams are better:  they're at least as fast, less error-prone, and
much more flexible.

The biggest disadvantage to using streams is the documentation:  Chapter 8
of the Turbo Vision guide misleads you into thinking that streams are only
good for objects.  In fact, they're good, general purpose random access
binary files.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Organization: Penn State University
Date: Tue, 28 Jul 1992 12:15:17 EDT
From: <DLA5@psuvm.psu.edu>
Newsgroups: comp.lang.pascal
Subject: Using Printer

Can anyone tell me how to close a print job using the "Printer" unit.  I can
print to the printer, but when I an done, my paper is still in my deskjet.  Is
there some way to send formfeed statement to the printer, or can I close the
printer.  I tried to use the close(lst) statement, but this didn't seem to
work.  Thanks.


Dave Aumiller

P.S. Please post your response to my Email, because I rarely have access
to the Net.  Thanks again.
From: alouw@dos-lan.cs.up.ac.za (Andre Louw)
Newsgroups: comp.lang.pascal
Subject: HELP: Need TP 5.0 TPU Converter
Keywords: TP, PASCAL, TPU
Date: 24 Jul 92 20:26:10 GMT
Article-I.D.: dos-lan.alouw.7.712009570
Organization: Computer Science Department, University of Pretoria


I am currently using Turbo Pascal 5.0 - not out of free will, but because I 
have TP 5.0 units for which I don't have the original source code. I would 
very much like to upgrade the system to TP 6.0 (or at least TP 5.5) so that 
I can use OOP!!

My problem is, as you'll probably know, that the TPU files are NOT 
compatible between diferent versions of Turbo Pascal. I have tried a utility 
called TPU2OBJ which I obtained from SIMTEL20 but I keep on getting an error 
stating something like "invalid file format ver 4.0" - I suspect this means 
that the utility only converts TP 4.0 units - allthough the supplied 
documentation doesn't mention anything about this.

I would appreciate it if anyone can send me some info on where to obtain a 
similar utility for converting TP 5.0 .TPU's to .OBJ or TP 5.5/6.0 .TPU's!!

Also, please tell me if you know of another way around the problem...

Thanx-a-mil


units

           *----------------------------------------------------------*
         /    Andre Louw @ University of Pretoria (South Africa)    / |
        *-----------------------------+---------------------------*   |
        | E-Mail: ALouw@cs.up.ac.za +++++ Jesus: The ONE I Love - |   *
        | FAX...: (+27) 012 435464    |  Who was send from Above  | /
        *-----------------------------+---------------------------*
Newsgroups: comp.lang.pascal
From: lemek@eecae.msu.edu (John P. Lemek)
Subject: Graphics Printing
Originator: lemek@eecae.ee.msu.edu
Organization: Michigan State University, College of Engineering
Distribution: na
Date: Wed, 29 Jul 92 15:11:04 GMT

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.

Thanks in advance,

John Lemek

+---------------------------------+-----------------------------------------+
| John P. Lemek                   | The Standard Disclaimer                 |
| lemek@egr.msu.edu               |                                         |
| lemek@cps.msu.edu               |                                         |
+---------------------------------+-----------------------------------------+



Xref: sparky comp.lang.pascal:4560 alt.msdos.programmer:2079
From: sl8nl@cc.usu.edu
Newsgroups: comp.lang.pascal,alt.msdos.programmer
Subject: Re: Hi-rez timer/Graphics routines.
Date: 26 Jul 92 23:19:59 MDT
Organization: Utah State University

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

Bresenham line drawing routines are FAST!  Jim Bridges (I think Jim) has 
files out in the public domain called VGAKIT?? that already do this.  Michael
Abrash has covered this technique in his articles.  If you can't find code,
I'll post some.


From: wayne@hpfcso.FC.HP.COM (Wayne Covington)
Date: Wed, 29 Jul 1992 17:33:04 GMT
Subject: Re: Ctrl-C
Organization: Hewlett-Packard, Fort Collins, CO, USA
Newsgroups: comp.lang.pascal

ts@uwasa.fi (Timo Salmi) writes in part:

> 2) If you post to a newsgroup, please have the courtesy of being
> prepared to read it. 

Timo, thank you for saying this.  It's not only that others may learn
from posted responses.  Suppose the poster receives one private reply,
and it is wrong.  There is no opportunity for the rest of us to offer
a correction or a better way of doing whatever.

Wayne
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:41:57 GMT

In article <1992Jul30.174037.6433@nntpd.lkg.dec.com> reagan@hiyall.enet.dec.com (John R. Reagan) writes:
>
>In article <Bs6L75.BDK@knot.ccs.queensu.ca>, dmurdoch@QueensU.CA (Duncan Murdoch) writes...
>> 
[ stuff deleted ]
>
>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...
>

"Well, why didn't you say so?" (Wizard of Oz).  

John, can I do something like the following to get around the above problem:

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

I don't have a copy of the Pascal Standard handy.  Is there a way to
explicitly qualify the  predefined integer type?  


--Larry %)


Newsgroups: comp.lang.pascal
From: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: TP 6.0 bug in Comp formatting
Organization: Queen's University, Kingston, Canada
Date: Fri, 24 Jul 1992 03:33:57 GMT

Here's a bug report I've sent to Borland:

The program below illustrates a bug in the formatting of the Comp type:
even though the 19th digit is stored accurately, it's always printed as a 0.

 {$N+}
  var
    c,d : comp;
    i : integer;
  begin
    c := 1000000000000000000.0;
    writeln('c=',c:0:0);
    for i:=0 to 10 do
    begin
      d := c+i;
      writeln('d=',d:0:0,' d-c=',d-c:0:0);
    end;
  end.

   This prints:

    c=1000000000000000000
    d=1000000000000000000 d-c=0
    d=1000000000000000000 d-c=1
    d=1000000000000000000 d-c=2
    ... and so on.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: ts@uwasa.fi (Timo Salmi)
Subject: Re: ANSI with Turbo Pascal 6.0
Organization: University of Vaasa, Finland
Date: Fri, 31 Jul 1992 19:53:54 GMT

In article <1992Jul29.133021.9627@uxa.ecn.bgu.edu> mudrc@uxa.ecn.bgu.edu (Daniel R. Crowson) writes:
>  I'm interested in how to add ANSI graphics to programs with TP.

You'll find some elementary information on this in the Turbo Pascal
section of

112730 Jun 13 12:23 garbo.uwasa.fi:/pc/ts/tsfaq29.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.  The mirrors may lag occasionally, or might not
have all the files.  If you do not receive my reply within five
days, please ask your own site's system manager to construct a
returnable mail path for you". 

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


Newsgroups: comp.lang.pascal
From: tpehrson@javelin.sim.es.com (tim clinkenpeel)
Subject: source for DELAY procedure (CRT unit)?
Reply-To: tpehrson@javelin.sim.es.com
Organization: Evans & Sutherland Computer Corporation
Date: Tue, 28 Jul 1992 20:48:58 GMT

i would like to have some processor-independant delays in my tp5.0 source, but
i can't use the CRT unit (and thus the delay routine) because of a conflict
with my customized ansi routines.  i know it would be relatively easy to write
my own using GETTIME; however, i figured the wizards who wrote DELAY are one
up on me in the efficiency department.

my point:  do you have the code for the DELAY procedure?   would you please
mail it to me?

thanks.

-- 
------+- acceptance not condemnation.  rehabilition not incarceration -+------
i exclusively represent myself.  WARNING: my messages are offensive to morons!
|`````````` for every grain of sand that is washed up on the land '''''''''''|
|_____ there's another mermaid smiling and another searching fisherman ______|
Newsgroups: comp.lang.pascal
From: konopka@ils.nwu.edu (Ray Konopka)
Subject: Re: WANTED: multi-line text entry with editing featu
Organization: The Institute for the Learning Sciences
Date: Wed, 29 Jul 1992 18:30:50 GMT

In article <31554@adm.brl.mil> usr3947a@tso.uc.edu (Kenneth Wronkiewicz) writes:
>excatly what code i could use as whell.....   i figure that it would be a 
>parcedure with a ReadChar or ReadLn command then a checking routene for word
>wrap, command charachters, etc.

If you are using TP 6.0, take a look at the TMemo class in 
TVISION\EDITORS.PAS.  It provides a Turbo Vision multiline
entry field, with the same editing features that are in 
the Editor class, because TMemo is derived from TEditor.

NOTE: You should pick up TP6BUGS6.ZIP from garbo.uwasa.fi
and look up the bugs listed for the EDITORS.PAS file.

Hope this helps.

Later,
Ray Konopka
konopka@aristotle.ils.nwu.edu

Long Live Turbo Pascal!

Newsgroups: comp.lang.pascal
From: s1949782@titan.ucc.umass.edu (Matthew Crocker)
Subject: Re: HELP !!! Is there any ability to pass various number of parameters to TP 6.0 function or procedure
Organization: University of Massachusetts, Amherst
Date: Mon, 27 Jul 1992 19:42:39 GMT


Well you can <Kinda> do it this way

Procdure Foo(Args : pCollection);

where Args is a collection of whatever

so if you know that you would want severl pStrings but didn't know how many
then

for Index := 0 to Args^.Count - 1 do
 Writeln(pString(Args^.At(Index))^);

would printer out all of the strings...

this is a round about way of doing this but it can be done.


Hasta,

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Matthew Crocker
s1949782@titan.ucc.umass.edu
crocker@elux3.cs.ucc.umass.edu
From: billtutt@iowegia.uucp (Bill Tutt)
Newsgroups: comp.lang.pascal
Subject: Re: code Scrambler?
Date: Thu, 30 Jul 92 14:51:27 CDT
Distribution: world
Organization: Iowegia Waffle BBS, Clive IA USA, +1 515 226 2156

dmurdoch@QueensU.CA (Duncan Murdoch) writes:

> 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

There is that sort of thing available for C.  It takes a C program and
strips the comments, change all the loops to ifs and gotos, and mangle 
the local variables.  The company uses this to have the C code put on 
various systems without actually giving away any of there secrets.

:--------------------------------------------------------------:
:  Bill Tutt                             billtutt@iowegia.uucp :
|  There are worlds out there where the sky is burning, and    |
|  the sea's asleep and the rivers dream; people made of smoke |
|  and cities made of song. Somewhere there's danger, some-    |
|  where there's injustice, and somewhere else the tea is      |
|  getting cold. Come on, we've got work to do.                |
|                                                              |
|         The Doctor in "Survival"                             |
Newsgroups: comp.lang.pascal
From: wmsg4931@uxa.cso.uiuc.edu (Walter M. Seiler)
Subject: Numerical Recipes
Summary: Looking for subroutines
Organization: University of Illinois at Urbana
Date: Tue, 21 Jul 1992 18:17:06 GMT

I have Numerical Recipes in C book and the fortran
book and the fortran disk.  But was wondering if
anyone out there could assist me in getting the
C and/or pascal code segments.

Any help would be appreciated.

Walt
email: walt@uiuc.edu
From: arao@sdcc13.ucsd.edu (Andy Rao    )
Newsgroups: comp.lang.pascal
Subject: Ctrl-C
Keywords: Ctrl-C
Date: 23 Jul 92 19:04:15 GMT

Can someone tell whether or not it is possible to disable the 
Ctrl-C using turbo pascal from borland??? is there a special routine
that can do this sort of thing?  please reply in e-mail as i don't
often use the net. thank you.


arao@sdcc13.ucsd.edu
:
From: skt@dcs.glasgow.ac.uk (Simon K. Train)
Newsgroups: comp.lang.pascal
Subject: PASCAL sources for CRYPTO progs.
Keywords: crypt pascal
Date: 31 Jul 92 14:28:24 GMT
Organization: Glasgow University Computing Science Dept.


 I'm looking for PASCAL source code for ANY type of crypting algorithm. I'm
using THINK Pascal 4.0 on a Mac SE/30. Any suggestions would be much
appreciated.
 Thanks.

Simon T.
Newsgroups: comp.lang.pascal
From: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: Re: Matrix routines in pascal
Organization: Queen's University, Kingston, Canada
Distribution: usa
Date: Thu, 30 Jul 1992 03:07:23 GMT

In article <1992Jul30.010006.19073@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:

> QMatrix = object(QContent)
>   EntrySize: Longint;
>   EntriesAcross: Longint;
>   EntriesDown: Longint;
>   Entries: EntryArray;
>
>   function QMatrix.Construct: Boolean;
>   override;
>
>   procedure QMatrix.SetEntry (x, y: Longint; aPtr: univ Ptr);
>   procedure QMatrix.GetEntry (x, y: Longint; aPtr: univ Ptr);
>  end;

That's more general than what I did (I decided to specialize from the
beginning on "float" entries, in the hope of getting some efficiency
benefits), but suffers from the same problems as mine:

Simple statements like

  prod[j,k] := prod[j,k] + factor1[j,i]*factor2[i,k];

become ugly messes like:

  prod^.setval(j,k, prod^.val(j,k) 
                      + factor1^.val(j,i)*factor2^.val(i,k));

and handling expressions like

  prod := MatrixProduct(factor1, MatrixSum(term1, term2));

becomes a real pain.  This is one area that's made me think seriously of
switching to C++; luckily I tried reading Stroustrup's book, which
brought me back to my senses :-).

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.lang.pascal
From: bmrrnm@vmsa.technion.ac.il
Subject: Mouse cursor on high resolution
Organization: Technion, Israel Institute of Technology
Date: Wed, 22 Jul 1992 12:32:08 GMT

Hello everyone,

  I'm now writing a program using Turbo Pascal 6 which uses high-resolution 
graphics (640x480x256) and MUST use a mouse. I don't want to write all the
mouse routines by myself, so I've been looking in the last week for a unit 
which can do the job. I've found about 10 different mouse libraries for Turbo
Pascal, but none of them have worked as expected - using all of the them the
mouse cursor was invisible (they all worked using lower resolution).

  I don't know what's wrong. Is it the mouse-units or my mouse-driver (I
have Genius mouse with its driver installed)? And what can I do about it?

  I'll be gratefull for any help.

Yair Moshe
bmrrnm@vmsa.technion.ac.il

p.s. Sorry about my English.
Newsgroups: comp.lang.pascal
From: soi@utrade.e-burg.su (Oleg I. Subachev)
Subject: My own solution of the problem about various number of parameters
Reply-To: soi@utrade.e-burg.su
Organization: Ural's Trade House
Date: Mon, 27 Jul 92 18:21:55 +0300

Hi all !!!

In the evening after asking the question about various
number of parameters I have thought out the satisfactory
for my needs decision.
This code is the example of my solution.
( The idea was taken from TurboVision, of course. )

type
  tpAP = ^tAP;
  { another parameter }
  tAP = record
          R : real;
          Next : tpAP;
        end;

function OMP( rFI : real; pNI : tpAP ) : tpAP;
{ one more parameter }
var
  pT : tpAP;
begin
  New( pT );
  pT^.R := rFI;
  pT^.Next := pNI;
  OMP := pT;
end; { OMP }

function MEDIAN( pNI : tpAP ) : real;
var
  p, pT : tpAP;
  rP : real;
  wK : word;
begin
  pT := pNI;
  rP := 0;
  wK := 0;
  while pT <> NIL do
    begin
      rP := rP + pT^.R;
      Inc( wK );
      p := pT^.Next;
      Dispose( pT );
      pT := p;
    end;
  if wK = 0
    then Halt( 1 );
  MEDIAN := rP / wK;
end; { MEDIAN }

begin
  WriteLn( MEDIAN(
                   OMP( 3.41,
                   OMP( 0,
                   OMP( 43,
                   OMP( -43,
                   OMP( 4,
                   OMP( 4,
                   NIL ))))))
                 )
         );
end.

To add one more parameter you have to make two things:

1. add string with OMP( ...
2. add bracket after NIL


Thanks for all, who answered me.

Oleg I. Subachev