HDTenEightyP/NetNews huggingface dataset:
From: eldred@rrunner.jpl.nasa.gov (Dan Eldred)
Subject: Matrix routines in pascal
Organization: Jet Propulsion Laboratory
Distribution: usa
Date: Wed, 29 Jul 1992 16:29:18 GMT


For people who attempt to do numerical programming in pascal:  how
do you handle matrices?  In particular, what approach do you use to
create general purpose routines like matrix multiply, inversion,
eigensystems, etc.?  If you have a pascal compiler that allows
conformant arrays, this is pretty easy--either do Fortran style
calls in which the dimensions are passed as parameters, or pass
a record structure which has the dimensions embedded.  But I'm
having trouble coming up with a satisfactory strategy for ANS
pascal (i.e. Think Pascal 4.0 on the Mac).  Suggestions?

	- Dan

Newsgroups: comp.lang.pascal
From: friesenda@skyfox.usask.ca
Subject: RE: Integer <-> String
Organization: University of Saskatchewan
Date: Tue, 21 Jul 1992 16:40:37 GMT

In a previous article, rbennet1@neumann.une.edu.au (Robert Bennetts.) wrote:
> 
>	Hi all...
> 
>	Yes I am not a very experienced programmer, and need some help, 
>       and I can't seem to find how to do this.
> 
>	Can I change an Integer, or any other variable for that matter, 
>       into a string so I can output it using OutText.

Yep.  Check your TP manual for the Str function.  The Val function does
just the opposite (changes strings to integers).

>	I am attempting to write a whole program in nice fonts and in 
>       graphics mode, but they don't want to make it easy in TP6.0.
>	It seems as if I have to 'InitGraph' every other second, and for 
>       some reason, some of my procedures only work if they have an even 
>       number of lines in them so I tack an 'a:=a;'on the end of it and 
>       suddenly it runs like magic. Seems odd to me anyway.

Very odd.  I think your program has some serious problems.  You should
only have to call InitGraph once at the beginning of your program.
You don't have any extra calls to CloseGraph scattered throughout your
code do you?  You should only have one at the end of your program.
I can't help too much more without seeing the code (or a better 
description of what exactly you are doing).

>	Ross Bennetts...
> 
>		rbennet1@neumann.une.edu.au 


-----------------------------------------------------------------------------
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 |
Newsgroups: comp.lang.pascal
From: wct@po.CWRU.Edu (William C. Thompson)
Subject: Programming locking only when called from batch
Reply-To: wct@po.CWRU.Edu (William C. Thompson)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Thu, 30 Jul 92 02:24:09 GMT


I have modified the output of the program that comes with TP6 that
shows the files & directories.  The program is virtually the same.
If I run the program from a batch file in a directory with few
entries, no problem.  If I run the program directly (no batch) in
a directory with several entries, no problem.  If I run the program
in a directory with several entries, it either locks or does strange
things.  I have already hunted the pointer references, which are
very few.  I'm not doing anything stupid like not allocating
memory, deallocating too much, or assigning things to a nil pointer.
The problem appears to be with the stack size, which I increased to
30K, which theoretically should support a directory with over 100, 
more than DOS allows.  Why would the program not lock when directly
called but it would when called from a batch file?
-- 
"What do you mean Star Trek isn't real!?" - anonymous
From: jdp@aelle.cs.odu.edu (John David Powell)
Newsgroups: comp.lang.pascal
Subject: Re: TurboPascal: Programming the IBM PC & XT
Summary: TP on older XTs [or old workhorses never die]
Date: 22 Jul 92 14:32:04 GMT
Followup-To: right here is fine...
Distribution: na
Organization: Old Dominion University Dept. of CS, Norfolk VA

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.
>
>-alan

    I've run TP 5.5 [IDE] on 8088 and 8086 machines in the past, and
didn't notice anything was missing or non-functional that was supposed to 
be (You wouldn't expect XMS usage on an original Tandy 1000, even if 
it is maxed to 640K with a Zuckerboard).  Some recent database applications
utilizing TurboPower's toolkits cause one of the older platforms to choke, 
but that's because it hits the RAM ceiling at 256K.  And there are no plans
to rewrite the app with overlays so it can run on the museum piece.

    Most older XTs I've seen come with CGA, so any app rewritten for this
class PC employing graphics should probably recognize our old buddy CGA.  
Care has to be exercised if porting a database program, let's say, to a 
hard-diskless box.  Those darn floppies are so darn restricting when it
comes to data storage!

    
Newsgroups: comp.lang.pascal
From: harrisp@wl.aecl.ca
Subject: Help re: Pascal to C translater for MS-DOS
Organization: AECL RESEARCH
Date: Thu, 30 Jul 1992 19:24:08 GMT

Sorry to post a question which may well be in the FAQ.
I heard about a pascal to c converter, and mention it to my brother-in-law.
He uses pascal all the time, while I rarely touch the stuff. He is really
antsy for me to get ahold of one for him, as he does not have access to
Internet. Could anyone tell me where to FTP a copy of the program from. I've
been able to find source code for it in a number of unix directories around the
world, but would really like an executable for msdos so we could see what
it does before building the executable from source. Any one have any comments
about how well it works for say Turbo Pascal to Turbo C?

        Thanks in advance, and sorry again for what may better be
                             addressed in the FAQ.

                                        Phil Harris
        Please post response or email to me.
Newsgroups: comp.lang.pascal
From: csci11ba@cl2.cl.uh.edu (451924952 NEWMAN, DANA FRANK)
Subject: Re: Sparse matrices
News-Software: VAX/VMS VNEWS 1.4-b1  
Reply-To: CSCI11BA@cl.uh.edu
Organization: University of Houston - Clear Lake
Date: Wed, 22 Jul 1992 06:54:00 GMT

In article <1992Jul20.042405.6954@usenet.ins.cwru.edu>, wct@po.CWRU.Edu (William C. Thompson) writes...
> 
>Does anyone know how to implement sparse matrices?  From my understanding,
>spreadsheet programs like Lotus 123, etc. use sparse matrices to store
>all of cells.  A sparse matrix is then essentially a matrix, but some
>element may not exist, and should therefore not occupy any space in 
>memory.

1. Try implementing it using an LU decomposition.

2. There is a good text in "W. Weaver and J. Gere, Matrix Analysis of Framed
   Structures, D. Van Nostrand."

3. Or, look in any Linear Algebra Textbook.

I realize thats not a real answer, but it might get you started on a "roll yer 
own"
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: Fri, 31 Jul 1992 17:42:50 GMT


In article <1992Jul30.184157.9500@aero.org>, jordan@aero.org (Larry M. Jordan) writes...
> 
>  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?  
> 
Extended Pascal doesn't require a predefined interface named SYSTEM.
However, if such an interface was provided with INTEGER inside of it,
the above should work.

---
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: s1949782@titan.ucc.umass.edu (Matthew Crocker)
Subject: Turbo Vision Resource Compiler
Organization: University of Massachusetts, Amherst
Date: Thu, 23 Jul 1992 17:38:10 GMT


Hi,  I'm currently in the process of writing a "resource compiler" for
turbo vision.  Something that will save pView objects to a tResourceStream
. It will be an interactive program,  I may ad a command line option to
compile .RC files which will have the format similiar to Windows .RC files

What I would like to know is if there is any interest in this type of a program
or if anyone has written one already.

If there is an interest what would you expect to pay for a program like
this (Shareware).

I plan one writing one for my own use (I'm about 1/2 done)

-Matthew Crocker

PS  any ideas?
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Matthew Crocker
s1949782@titan.ucc.umass.edu
crocker@elux3.cs.ucc.umass.edu
From: jm59@prism.gatech.EDU (MILLS,JOHN M.)
Newsgroups: comp.lang.pascal
Subject: Re: Numerical Recipes
Date: 24 Jul 92 15:08:49 GMT
Organization: Georgia Institute of Technology

In article <Brr44J.5z7@news.cso.uiuc.edu> wmsg4931@uxa.cso.uiuc.edu (Walter M. Seiler) writes:

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

I ordered the _recipes_ and _examples_ diskettes in C for MS-DOS using the
form copy at the end of the book.  I had them charged against my VISA and
shipped surface mail.  I also ordered the _examples_ book.  Took about
one month.  I haven't tried to use them yet, and would welcome any comments.
I expect to use the material under BC++.

(I just received the materials day before yesterday.)

Sorry to disract comp.lang.pascal on this, but thought the question might
be of interest.  Anyone use the Pascal version?

Regards --jmm--


-- 
John M. Mills, SRE; Georgia Tech/GTRI/TSDL, Atlanta, GA 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!jm59
Internet: jm59@prism.gatech.edu
 "f U cn rd dis, U mst uz Unix!!!"  ...jaw
Newsgroups: comp.lang.pascal
From: ts@uwasa.fi (Timo Salmi)
Subject: Re: Ctrl-C
Keywords: Ctrl-C
Organization: University of Vaasa, Finland
Date: Mon, 27 Jul 1992 04:05:03 GMT

In article <36037@sdcc12.ucsd.edu> arao@sdcc13.ucsd.edu (Andy Rao    ) writes:
>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.

1) Please see the frequently asked questions
112730 Jun 13 12:23 garbo.uwasa.fi:/pc/ts/tsfaq29.zip

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

"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: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: Re: Is this legal - why/why not?
Keywords: Pascal Syntax, Semantics
Organization: Queen's University, Kingston, Canada
Date: Tue, 28 Jul 1992 20:00:18 GMT

In article <l7b682INNasf@muleshoe.cs.utexas.edu> 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.
>
>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'.

Is this in Think Pascal again, or what compiler?  It works
in TP 6.0.

>Why? Why is this declaration illegal?

One thing that would make it illegal would be to precede
it by the first one defining Used.  You can't repeat identifiers
(i.e. "integer") in enumerated type definitions.  Another 
possibility is that there's a bug in your compiler.

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

Again, it works in TP 6.0 (i.e. it gives an error
"structure too large").  However, if you put that
redefinition of "integer" first, then it's a syntax
error.  You need a range of indices for an array
definition, not a single constant.

Duncan Murdoch
From: tech@crash.cts.com (Don Bontemps)
Newsgroups: comp.lang.pascal
Subject: File Reader for TP 6.0
Date: 28 Jul 92 04:28:44 GMT
Distribution: na
Organization: CTS Network Services (crash, ctsnet), El Cajon, CA

I am in need of the source code for a text file reader with up/down
line/page scrolling.  The file reader is to be used in conjunction
with an application I am writing for a consulting firm.  I have recently
purchased Turbo Pascal 6.0 and haven' got around to learning OOP yet.
Turbo Vision code would be fine but I would much prefer non Turbo Vision
code.  Or a unit would be nice also.  To make matters slightly
complicated, the files I am dealing with are WordStar(tm) files.  So
I must be able to do the "strip bit 7 trick" and then read the file.

Any help at all would be greatly appreciated.  Thanks (in advance)....


--
Donald P. Bontemps Jr.
TechKnow Computer Consulting
San Diego, California
(619) 899-2114
From: guglielmetti@elia.epfl.ch (Philippe Guglielmetti)
Newsgroups: comp.lang.pascal
Subject: Re: Sparse matrices
Date: 24 Jul 92 13:41:44 GMT
     <1992Jul22.234424.3870@usenet.ins.cwru.edu>
Organization: Institut d'Automatique IA-DME-EPFL
X-UserAgent: Nuntius v1.0

Another approach is to use a kind of hash-table. 
each non-zero element is implemented as an index (i*columns+j for
example) and the value itself.All these elements are kept sorted in an
array. When you want to retrieve element (i,j), compute (number of
non-zero elements) *(i*columns+j)/(rows*columns) that's roughly the place
of the element you're looking for in the table. Look if you find it...
it'll be quick and won't use much memory...
I've done something like this using Turbo Vision TCollection object which
allows efficient dynamic size changing and gives lot of useful methods to
implement the hash-table...

The proposed hashing  method is efficient for very sparse matrix with
randomly distributed non-zero elements, but you could use a different
hash method if the elements are grouped along the diagonal to reduce the
number of hash-code collisions.

Philippe Guglielmetti     |  ***                *
Institut d'Automatique    | *                   *
Ecole Polytechnique       | *  **   ***   *  *  *   *  *
Federale de Lausanne      | *   *  *   *  *  *  *   *  *
1015 Lausanne             |  ***    ***    ***   *   ***      
SWITZERLAND               |
guglielmetti@elia.epfl.ch | SMILE ! Tomorrow will be worse.
From: STANKULI%UWF.BITNET@vtvm2.cc.vt.edu ( stan kulikowski ii)
Newsgroups: comp.lang.pascal
Subject: packtime and unpacktime algorithms?
Date: 30 Jul 92 21:51:39 GMT


  does anyone have access to tp's algorithms for packtime and unpacktime
procedures?  the longint returned by packtime is not a standard julian
date so i would like to know what the limits in the numerical conversion
are.  i assume this was established by microsoft somewhere when they set up
their FAT specifications.

it seems a shame that the datetime type defined in the dos unit does not have
100th seconds in it so we could use the thing for elapsed time measurements
within the 10th second accuracy we can get from the clock.
                                                          stan

    .                  stankuli@UWF.bitnet
   ===
         close your eyes, my darling, or three of them at least
   ---                                          -- old venusian lullaby
From: rdavies@waikato.ac.nz
Newsgroups: comp.lang.pascal
Subject: Turo Pascal Grammar Wanted
Date: 23 Jul 92 11:46:57 +1200
Organization: University of Waikato, Hamilton, New Zealand

I am looking for a grammar for Turbo Pascal 6.0 or 5.5.

Any help would be much appreciated.
Newsgroups: comp.lang.pascal
From: amead@s.psych.uiuc.edu (Alan Mead)
Subject: Does Borland have a 480x350x256 BGI?  (TP6?)
Organization: UIUC Department of Psychology
Date: Tue, 21 Jul 1992 18:20:09 GMT

I didn't upgrade to Turbo Pascal v6.0.  Has Borland ever released
a high resolution VGA BGI capable of displaying 256 colors?

Thanks.

-alan mead
From: preavley@cs.utexas.edu (Paul Reavley)
Newsgroups: comp.lang.pascal
Subject: TVision TFileEditor&Buffers.pas
Date: 28 Jul 1992 20:27:09 -0500
Organization: U Texas Dept of Computer Sciences, Austin TX
NNTP-Posting-Host: victoria.cs.utexas.edu

  I'm trying to add resize capability to the buffer manager in
Buffers.pas that TFileEditor uses.  As you know if you're
familiar with this buffer scheme, the default is to set 
BufHeapSize to however much space you wish to take from the
top of your heap space for file editing, then be stuck with
that hard boundary for both your buffer heap size and your heap size. 
  I can successfully move existing editing buffers up in
the buffer heap and have them function properly - using
the same code that setbufsize uses to move buffers above 
an expanding buffer.  But I can't seem to reunite the low part
of the editor buffer space no longer in use -  with the top of
my heap - as soon as I do something that attempts to utilize
this recaptured heap my program locks up.

   I'm using something like:
     PtrRec(HeapEnd).Seg := BufHeapEnd - BufHeapSize {the new buffersize};
to reset the program's heapend.
  Is something else necessary/possible in order to rejoin buffer heap space
with the top of program heap?  This is all new to me, and any enlightenment
would be appreciated.  
			 Paul Reavley
-- 
               ===========-=-=-.-|-.-=-=-==========
               Paul Reavley  preavley.cs.utexas.edu  
      "Life is too precious to spend it on Unix" - Unknown
	             =====-=-=-.-|-.-=-=-=====
From: amead@s.psych.uiuc.edu (Alan Mead)
Newsgroups: comp.lang.pascal
Subject: WANTED: multi-line text entry with editing features
Date: 23 Jul 92 19:29:50 GMT
Organization: UIUC Department of Psychology

I just finished a program that will administer surveys (among other
things) online.   But now we want to add free-response questions.

I *could* just do  WHILE (LINE[I]<>'') DO BEGIN INC(I); READLN(LINE[I]); END;

But I want this to be friendly etc and I want the user to be able to
erase and insert etc even if it was on a previous line.

It would be nice to have words "wrap" nicely onto the next line, too.

It seems this would be present in any text editor, does anyone have a bit
of code to do this?

Thanks.

-alan mead
From: bobb@vice.ICO.TEK.COM (Bob Beauchaine)
Newsgroups: comp.lang.pascal
Subject: Re: I need mouse code
Date: 30 Jul 92 23:09:40 GMT
Organization: Tektronix, Inc., Beaverton,  OR.

In article <1992Jul30.091325.10833@CS.ORST.EDU> frederm@prism.CS.ORST.EDU (Michael Frederick) writes:
>
>
>  Does anyone out there have some generic code that reads the location
>  of the mouse other than "mousewhere" or the ones included in the
>  "drivers.tpu"?
>
>  Someone earlier asked the same question but I did not see a reply so'
>  I thought I'd ask too.
>
>  What I'm looking for is some code that includes the interupt calls and
>  etc.  Mainly I want to be able to tell what pixel the mouse is on in
>  any graphics mode....

  I've seen this question on occassion on here on the net.  My
  question then becomes:

    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.

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

Bob Beauchaine bobb@vice.ICO.TEK.COM 

C: The language that combines the power of assembly language with the 
   flexibility of assembly language.

Real friends don't let friends use UNIX.
From: wilson@mailhost.aa.cad.slb.com (David Wilson)
Newsgroups: comp.lang.pascal
Subject: Re: Is this legal - why/why not?
Date: 30 Jul 92 20:29:01 GMT
Organization: Schlumberger CAD/CAM; Ann Arbor, Michigan (USA)

In article <1992Jul30.182727.9048@aero.org> jordan@aero.org (Larry M. Jordan) writes:
>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.

First, what constitutes the "scope" of an identifier depends on the language...

Mr. Reagan is correct according to the Pascal Standard.  MANY compilers
fail to diagnose violations, as the simplest and most obvious implementations
of scope rules aren't up to it.  I won't bother quoting the Standard (see
section 6.2.2 and especially 6.2.2.5 if you have a copy), but the gist of it
is that the second type declaration "integer = 1..10;" is the defining point
for the 'inner' "integer", and serves to remove the entire block from the
scope of the 'outer' "integer" which "foo = integer" is apparently trying
to refer to.  The "foo" declaration is then attempting to refer to the type
before it has been declared (and since it isn't the target type of a pointer
that isn't legal).

As far as quoting Ghezzi and Jazayeri, different languages differ on this
fine point when they define their respective scope rules.  The Pascal
Standard has opted for clarity of the written code at the expense of 
implementation convenience.  Other language designers have resolved the
tradeoffs differently.

I haven't tried this case in Turbo Pascal, but Turbo Pascal and Standard
Pascal are distinct languages anyway.  If Sun's Pascal purports to conform
to the Standard, then Sun has an error.  Borland makes no such claim.

Dave Wilson