HDTenEightyP/NetNews huggingface dataset:
From: James_Zuchelli@qm.claris.com (James Zuchelli)
Newsgroups: comp.programming
Subject: Re: Learning Pascal...
Date: 7 Oct 92 20:09:29 GMT
Distribution: usa
Organization: Claris Corp

In article <keo9T=S00WB_MjuFNn@andrew.cmu.edu>, tb0o+@andrew.cmu.edu (Todd Keenan Bowman) writes:
> 
> 
> I'm trying to learn how to program in Pascal.  The software I plan to use will
> be Symantic's THINK Pascal.
> 
> What I need to know is whether or not there are any good Pascal instruction
> books that I can use to self-teach myself Pascal in conjuction with the THINK
> Pascal software. I want something that starts off assuming the user has no
> experience (although I do have some) and works up to a fairly high level.
> 
> Any suggestion will be greatly appreciated
> 
> todd
> tb0o+@andrew.cmu.edu


Thrte is a good book for Pascal on the mac, I thin it is titletle "Macintosh
Toolbox Programming in Pascal" or something like that.  Read the intro, it was
written explicitly for Think Pascal.  Symantec also offers a tutorial package
that teaches you to program by writing a game.  I Have not actually tried it
but it may be helpful.

James Zuchelli
---------------------
the above represents my personal opinion and not that of Claris Corp. or my
Employer.
From: ral@imagen.com (Robert A. Lerche)
Newsgroups: comp.programming
Subject: Literals as variables (was Re: NO NUMBERS!...)
Date: 9 Oct 92 15:00:23 GMT
Organization: QMS, Inc. / Imagen Division

hartman@ulogic.UUCP (Richard M. Hartman) writes:

>There was a really old bug I heard of once.  FORTRAN compiler
>kept literal values as if they were variables (who knows why,
>perhaps it had to do w/ the machine architecture....) so when 
>a typo occurred, instead of:
>	i3 = i1+1
>they had:
>	3 = i1+1

>and from then on the numeric constant '3' in the program was
>interpreted as whatever the value of "i1+1" was at the time
>(i.e. if i1 had been 5, i1+1 would have been 6 and from then
>on,
>	i2 = 1+3
>would set i7 to the value of 9!!!)

This seems the appropriate spot to point out that C explicitly defines
character string literals as variables.  That is, a program is
explicitly allowed to modify a literal, with results parallel to the
above.

Technology marches on.
From: dik@cwi.nl (Dik T. Winter)
Newsgroups: comp.programming
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Date: 9 Oct 92 02:26:15 GMT
Organization: CWI, Amsterdam

In article <392@ulogic.UUCP> hartman@ulogic.UUCP (Richard M. Hartman) writes:
 > In article <1992Oct7.123207.4987@monu6.cc.monash.edu.au> bena@yoyo.cc.monash.edu.au (Ben Aveling) writes:
 > >Geoff Kuenning (geoff@ITcorp.com) wrote:
 > >: In article <tholle16.717655308@ursa> tholle16@ursa.calvin.edu (Tim Hollebeek) writes:
 > >: (3) It is *always* poor practice to name a constant after its value.
 > >: There is nothing stupider than:
 > >: 	#define ONE 1
 > >: 	...
 > >: 	x += ONE;
 > >: Name constants after their purpose.
Yes, name it: CONSTANT_ONE.
 > >
 > >I've heard of something stupider.  Started off much as above, 
 > >#define FOUR 4
 > >
 > >After some time, a major change was made, line had to change to
 > >#define FOUR 5
So this ought to be named VARIABLE_FOUR.
 > 
 > There was a really old bug I heard of once.  FORTRAN compiler
 > kept literal values as if they were variables
You indeed only heard, second hand at that.  The problem is that in
Fortran subroutine paramters are pass by reference (or value/return
which amounts to the same thing in most cases).  So if you pass a
constant, the address of the constant in memory must be passed.
When the subroutine (illegally) changes the parameter the constant
will be changed.  Some current compilers still exhibit similar
behaviour.  And no, it is not a bug, the program is wrong.
-- 
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland
home: bovenover 215, 1025 jn  amsterdam, nederland; e-mail: dik@cwi.nl
From: perm@csd.uu.se (Per Mildner)
Newsgroups: comp.programming
Subject: Re: Skip lists (was: Speeding up linked lists)
Followup-To: comp.programming
Date: 14 Oct 92 09:14:03
Organization: Computing Science Dept.,Uppsala University, Sweden
	<1992Oct11.170018.1892@organpipe.uug.arizona.edu>
	<1992Oct14.050230.18438@sq.sq.com>
NNTP-Posting-Host: groucho.csd.uu.se
In-reply-to: msb@sq.sq.com's message of Wed, 14 Oct 92 05:02:30 GMT

The original skiplist article is available from the CACM.src with WAIS
(as well as most other articles from a few years back).
--
Per Mildner			perm@CSD.UU.SE
Computing Science Dept.		tel: +46 18181049
Uppsala University, Sweden	fax: +46 18521270
Newsgroups: comp.programming
From: R2NVK@VM1.CC.UAKRON.EDU
Subject: Iterative Consensus method
Organization: The University of Akron
Date: Fri, 9 Oct 1992 00:23:56 GMT

Hi,
 I am looking for the source code of Iterative Consensus method(minimization of
truth tables). Any pointers to where i could look for or if some one could send
 me the code, would be greatly appreciated. Thanking in advance.
                       nagesh
 
 
 
 
 
Newsgroups: comp.programming,comp.realtime,comp.robotics,sci.electronics
From: Bob Zigon <bobz@truevision.com>
Subject: Control a PLC across a LAN
Organization: Truevision
X-Useragent: Nuntius v1.1
Date: Fri, 16 Oct 1992 16:07:50 GMT

I am looking for a software package that would allow me to control a PLC
across
a LAN from a IBM PC. Does such a package exist? The  LAN is already in
place in a lot of
our customer sites. We now want to control a bunch of machine tools with 
a PLC from
across the LAN.

Bob Zigon
bobz@truevision.com
From: watson@maths.uwa.oz.au (David Watson)
Newsgroups: comp.programming
Subject: Re: How to implement interpolation?
Date: 8 Oct 1992 23:45:18 GMT
Organization: The University of Westrn Australia
NNTP-Posting-Host: madvax.maths.uwa.oz.au
Keywords: interpolation, curves

oksalahti@hylkn1.Helsinki.FI (Oksalahti Mikko) writes:

>What is a simple way the program the following interpolation:
>	I have a list (or array) of controlpoints in 3D-space (x,y,z). For
>	example n points.
>	I want the draw a nice smooth curve which is interpolated through
>	these controlpoints (THROUGH them, not any Bezier/B-spline curve).

The "nicest" smooth surface through (x,y,f(x,y)) is obtained by
radial basis functions, and the minimum curvature form is probably
the nicest of these.  If n is not too large (< 100) this method is
quite fast because you need to solve an n+3 by n+3 matrix; then
interpolation at any location is just a summation of parameters.

If n is too big to solve without appreciable round-off error, things
are more difficult because you need to find subsets that are local
to the interpolation locations, and as you interpolate at the perimeter
of this subset you will get a slightly different surface than that
obtained at the edge of an adjacent subset.  These cases really
require natural neighbour interpolation which is perfectly smooth
everywhere.

The minimum curvature model uses the function  r^2 log r
where r is just Euclidean distance.  Other useful functions are
Hardy's function (r^2 + a^2)^0.5 where a is related to interpoint
distance,
the gaussian function e^(-r^2 / a^2)
and simply r^(3/2)

Setting up the matrix is difficult to explain but it is laid out
in my summary of interpolation methods which may be ftp'd

ftp cod.nosc.mil (128.49.16.5)  /pub/grid.ps
ftp cod.nosc.mil (128.49.16.5)  /pub/grid.tex
ftp cod.nosc.mil (128.49.16.5)  /pub/grid.ascii

The comments in this survey are extracted from the book

CONTOURING: A Guide to the Analysis and Display of Spatial Data 
by David F. Watson           ISBN  0 08 040286 0
to be published by Pergamon Press in the last quarter of 1992.

Promotional material about this book will be sent to anyone who 
sends their address to

Sue Cloke
Senior Marketing Manager
Earth & Environmental Sciences
Pergamon Press Ltd
Headington Hill Hall
Oxford OX3 OBW
UK

A gridding program that uses natural neighbor interpolation, NNGRIDR,
is available commercially.  Send email to me (Dave Watson) for 
details.

--
Dave Watson                          Internet: watson@maths.uwa.edu.au
Department of Mathematics            
The University of Western Australia               Tel: (61 9) 380 3359
Nedlands, WA 6009  Australia.                     FAX: (61 9) 380 1028
Xref: sparky comp.programming:2837 comp.lang.c:14693
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.programming,comp.lang.c
Subject: Pi (was Re: NO NUMBERS! (or even SHORT INTS!))
Date: 8 Oct 92 17:30:55 GMT
Followup-To: comp.programming
Organization: negligable


Just off the top of my head:

#define PI ((double) 3.1415926535897932384626)

Truncate as appropriate for your compiler.

If you need more digits, you're on your own.

I am not 100% certain about that final '6'.

For floating point constants it's usually best to define as double
to force greater precision.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Why do we never get an answer		|
when we're knocking at the door?	|	-Richard Hartman	
because the truth is hard to swallow 	|	hartman@uLogic.COM
that's what the war of love is for.	|
Newsgroups: comp.programming
From: ender@cs.montana.edu (Jacob Cormier)
Subject: Re: Skip lists (was: Speeding up linked lists)
Organization: Dept. of Computer Science, MSU, Bozeman Mt 59717
Date: Thu, 15 Oct 1992 23:49:53 GMT

In article <1992Oct15.001624.17364@coe.montana.edu> I wrote:
>
>I have some articals and some pseudocode for this that I got off the net
>last year.  If anyone would like a copy, Email me.
>

I got enough replies to this that I put them up at an anon ftp site.  They are
at ftp.coe.montana.edu in the directory /tmp/lpmud-pc/skiplist.  (Sorry about
the wierd placement.  It was the only dir I could make another dir in.)
--------------------------------------------------------------------------------
Jake Cormier | Poncho Magoo's, the worlds only Irish-Mexican | No,  I don't know
ender@caesar.cs.montana.edu    |   restaurant, located in    | what kind of food
oususajc@trex.oscs.montana.edu |  scenic Kalispell, Montana  | they really serve
Newsgroups: comp.programming
From: goss@micor.ocunix.on.ca (Timothy D. Goss)
Subject: Re: C programing
Organization: M.B. Cormier INC., Orleans (Ont)
Date: Fri, 9 Oct 1992 03:33:11 GMT

The best book I have seen for C beginners was written by the Waite Group.  I
can't remember the exact name (Waite Groups Guide to C Programming) but it is
a distinctive purple color.  I learned C on my own using this book some years
ago and although it takes a very VERY simple approach I think most programmers
would appreciate the thoroughness (sp?).  Many examples are included from
"Hello World" on up...  

 +----------------------------------------------------------------------------+
 |         _   /|                                                             |
 |         \'o.O'	    We the unwilling, led by the unknowning,          |
 |         =(___)=          are doing the impossible for the ungrateful.      |
 |            U             We have done so much, for so long, with so little |
 |     Timothy D. Goss      we are now qualified to do anything with nothing. |
 | goss@micor.ocunix.on.ca                                                    |
 +----------------------------------------------------------------------------+
From: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Organization: Department of Chemistry, University of Toronto
Date: Wed, 7 Oct 1992 21:11:44 GMT

In article <1992Oct7.050508.24986@nntpd.lkg.dec.com> diamond@jit.dec.com
(Norman Diamond) writes:
>In article <1992Oct3.173435.417@mnemosyne.cs.du.edu> jcastner@nyx.cs.du.edu
>(John Castner) writes:
>>|  186,000 miles per second:                   |
>>|    It's not just a good idea; it's the law.  |
>
>Someday someone might want to change this constant to a more accurate
>value, right?  Wouldn't it be nice if the constant were specified once
>in a location more suitable for constant specifications?

     As I explained to Norman in a letter, at least in the SI system,
that's no longer a possibility.  The speed of light has been fixed and
the length of the meter is now derived from this constant and the second
which is defined independently.  The point is moot in the imperial
system which isn't satisfactorily standardized.

>>#define PI 3.1415926
>
>It's a mistake to precompute this too, especially when 3.1415927 would be
>slightly more accurate than 3.1415926.  Shouldn't you include code to
>compute PI as accurately as possible?

     Hmmph.  I like to compute my own constants as much as possible, but
this sort of thing is dangerous.  At the very least you would have to
make sure you do this right (using some sort of series summation method
and doing careful error control, presumably in some exact arithmetic
system).  I would not want to rely on the value of PI generated by some
application of inverse trig functions nor would I want to sum a series
for PI in floating point arithmetic.  On most machines, this would be
OK, but it's not too hard to find hardware/compiler combinations that
are ridiculously poor at evaluating some functions for extreme values
of the arguments.  It is probably best in all but the most unusual of
cases to simply get a well-authenticated value of PI valid to some large
number of digits, type it in once, verify it many times (from
different sources) and use that consistently thereafter.

				Marc R. Roussel
                                mroussel@alchemy.chem.utoronto.ca
Newsgroups: comp.programming
From: jan-o@hsr.no (Jan Ove Haaland)
Subject: Pseudo-Random number generators
Organization: Rogaland University Centre
Date: Wed, 14 Oct 1992 09:00:56 GMT

I'm interested in algorithms for generating pseudo random numbers.
Unfortunately such algorithms are hard to come by, and nobody else around
seem interested, as random functions is found in all "decent" programming
languages. I'm not going to give up assembly, so I ask:

What is the shortest (computationally) algoritm for generating
pseudo random (integer) number, with even number distribution, and
loops at least about 2^32 before repeating ?

-- 
    ///    Jan Ove Haaland
\\\///    Rogaland University Centre
 \XX/    Norway (jan-o@hsr.no)
From: ralf@ark.abg.sub.org (Ralf Stephan)
Newsgroups: comp.programming
Subject: mktime() needed
Date: 10 Oct 92 09:36
Organization: Magick Shoppe, Gurth City

Sorry to post this probable FAQ:   Due to the missing of mktime() in
the Coherent C, I'm in desperate need of a function that returns the
days or seconds since some date.

So, if you have a general algorithm for this task, or the working source
of a mktime(), please mail.  Many thanks in advance.

--ralf
PS:  No, I don't have access to a library to look it up in a Knuth...
From: yangcj@hpsgm2.sgp.hp.com (Chuan Jun YANG)
Date: Mon, 12 Oct 1992 02:29:59 GMT
Subject: JAM Question ???
Organization: HP Singapore Notes-Server
Newsgroups: comp.programming


We have a lot of JAM software application systems on ENGLISH terminal. Recently
we need transplant them onto JAPANESE/CHINESE terminals. It is said that JAM
does not support two-byte-character terminals. Is this true? I hope someone 
can help me, or tell me how to get the JAM source files, then I can try to fix 
it and solve the problem . 

Please also introduce any other screen tools in HP-UX to me. 

Thanks for any help in advance.

Yang Chuanjun (yangcj@hpsgm2.sgp.hp.com)

Newsgroups: comp.programming
From: vaarisko@tnclus.tele.nokia.fi
Subject: A good 'diskette-filling' algorithm?
Organization: Nokia Telecommunications.
Date: Mon, 12 Oct 1992 11:39:16 GMT


Does anyone know a good algorithm for a 'diskette-filling' program?
The algorithm should find a subset of a set of numbers (=file sizes)
the sum of which is closest, but not bigger, than a given number (=disk
space left) ie. kind of a 'best-fit' algorithm..

I intend to put the algorithm into practice using 4dos batch language, so if
it tends to be *VERY* slow, maybe a 'nearly best-fit'-algorithm would do.

Thanks for your help,
Jouni
-- 
___________________________________________________________________________
 Jouni V{{riskoski             E-Mail:vaarisko@tnclus.tele.nokia.fi 
 Nokia Telecommunications      X400: ou=SWS/p=Nokia Telecom/a=Mailnet/c=FI
                               Tel: 358-0-511 6337 Home: 358-0-311 920
---------------------------------------------------------------------------
From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
Newsgroups: comp.programming
Subject: Re: Pi (was Re: NO NUMBERS! (or even SHORT INTS!))
Date: 9 Oct 92 07:37:15 GMT
Organization: University of Helsinki

hartman@ulogic.UUCP (Richard M. Hartman) writes:
>#define PI ((double) 3.1415926535897932384626)
>
>Truncate as appropriate for your compiler.

No particular value is good enough for all purposes.  I am sure that
there either exist, or will exist machines where the above value is way
too short.  And this is the whole point somebody tried to make: don't
embed constants, since they often aren't, and when they are, the
particular rounded value you choose is good enough at most on your own
computer.  (Of course, since you put it into a #define, it is easy to
change.)

>If you need more digits, you're on your own.

Not quite, considering that there are a few hundred million more digits
already computed (and I assume published).

>For floating point constants it's usually best to define as double
>to force greater precision.

That does nothing useful, since they are of type double by default,
unless you change them with a suffix.

	suffix		type		example

	no suffix	double		1.0
	F or f suffix	float		1.0f
	l or L suffix	long double	1.0L

I believe that these suffixes were introduced by ANSI.

--
Lars.Wirzenius@helsinki.fi  (finger wirzeniu@klaava.helsinki.fi)
Newsgroups: comp.programming
From: klos@interlan.interlan.com (Patrick Klos)
Subject: Re: packet driver interface
Organization: Klos Technologies, Inc. (603) 424-0138
Date: Thu, 15 Oct 1992 18:47:05 GMT

In article <4130@elwood.prz.tu-berlin.de> jost@jake.prz.tu-berlin.de (Jost Weinmiller) writes:
>From: jost@jake.prz.tu-berlin.de (Jost Weinmiller)
>Subject: packet driver interface
>Date: 15 Oct 92 15:42:56 GMT
>Hi,
>
>i am looking for a source code, building an addressable interface
>to a packet driver.
>
>i want to hand over packets from a higher layer to the
>packet driver (got the driver already), have the driver
>send the packets, grab the packets on the other end
>and hand them over to the receiving higher layer again.
>
>sounds quite simple, but i just cant find the interface.
>
>any pointers welcome.
>
>cheers
>jost
>-- 
>jost weinmiller                
>markelstrasse 41              
>1000 berlin 41               
>030/7933164

If you anonymous FTP to "vax.ftp.com", grab the file /pub/packet-d.ascii.  
It is the official definition of the packet driver and explains everything 
you need to know to write or use one.
From: pem@Minsk.DoCS.UU.SE (Per-Erik Martin)
Newsgroups: comp.programming
Subject: Re: Pseudo-Random number generators
Date: 15 Oct 1992 12:45:02 GMT
Organization: Student
NNTP-Posting-Host: minsk.docs.uu.se
In-reply-to: jan-o@hsr.no's message of Wed, 14 Oct 1992 09:00:56 GMT

In article <1992Oct14.090056.12275@hsr.no> jan-o@hsr.no (Jan Ove Haaland) writes:
>I'm interested in algorithms for generating pseudo random numbers.
>Unfortunately such algorithms are hard to come by, and nobody else around
>seem interested, as random functions is found in all "decent" programming
>languages.

Try these:

Communications of the ACM, October 1988 (v31):
  "Random number generators: Good ones are hard to find"
  by Stephen K. Park and Keith W. Miller.

Communications of the ACM, October 1991 (v33):
  "Random numbers for simulation"
  by Pierre L'Ecuyer.

The first one should be read by everyone who deals with random number
generator implementation, and it presents a simple but quite good
generator.
The second article is a second hand reference, I haven't read it myself.

--
 |\/|\/|\/| Per-Erik Martin,
 |  |  |/\| Department of Computer Systems, Uppsala University,
 |/\|  |  | Email: pem@minsk.DoCS.UU.SE
Newsgroups: comp.programming
From: ags@seaman.cc.purdue.edu (Dave Seaman)
Subject: Re: Learning Pascal...
Organization: Purdue University
Distribution: usa
Date: Thu, 8 Oct 1992 18:44:31 GMT

In article <tyamamot-081092143420@macj005.tokyo.japan.adobe.com> tyamamot  
(Taro Yamamoto) writes:
> Kathleen Jensen and Niklaus Wirth, PASCAL: User Manual and Report, 2nd  
Ed.,
> Springer-Verlag, New York Inc., New York 1975. 

You don't want the second edition, which is badly out of date. The fourth  
edition is more in line with the ISO standard, which is basically what  
THINK Pascal conforms to.

--
Dave Seaman
ags@seaman.cc.purdue.edu
Newsgroups: comp.programming
From: dhw@plex-1.ann-arbor.mi.us (David West)
Subject: Re: Ellipses?
Organization: Plex-1, Michigan's Public Access Usenet Gateway  (Ann Arbor).
Date: Fri, 16 Oct 1992 17:44:44 GMT

In article <1992Oct15.144816.9814@geovision.gvc.com> pt@geovision.gvc.com writes:
>I need an algorithm for generating points along an ellipse.  I assume I
>would have to specify three input points (centre, semi-major axis end,
>and another?)  These ellipses cannot be contrainted to have the semi-major
>axis along the x-axis.

If all you want is "points along an ellipse", then do the following: generate
points on the ellipse in the coordinate system given by its axes:
   x = a * cos(theta);  y = b  * sin(theta);  /* 0 <= theta <= 2*pi */
and transform to the coordinate system you want using a translation and a
rotation.

If, however, you want grid points which smoothly approximate an oblique
ellipse, it's much more difficult.  One way is to calculate a starting
point, such as an end of an axis, and to follow the contour of
   (x/a)^2 + (y/b)^2 = const
which passes through it, by calculating the tangent direction.  You have
to be careful in regions of high curvature.  The result is a Bresenham-like 
algorithm which can be implemented to use only integer arithmetic and which 
then runs very fast.    I wrote such a thing a few years ago, but the code 
is proprietary to my then employers, so I can't post it.

-- 
-David West            dhw@plex-1.ann-arbor.mi.us

"Ce n'e'tait pas un empire comme il faut, mais nous nous sommes diablement
bien amuse's."  -Col. Fleury, aide-de-camp of Napoleon III
From: david@csource.oz.au (david nugent)
Newsgroups: comp.programming
Subject: Re: DOS DEVICE DRIVER QUERY
Date: Thu, 08 Oct 92 20:07:45 +1000
Reply-To: david@csource.oz.au
Organization: Unique Computing Pty Ltd, Melbourne, Australia

gay@selkirk.sfu.ca (Ian D. Gay) writes:

> "To obtain information passed from CONFIG.SYS to a device driver at 
> initialization time, the BPB pointer field points to a buffer 
> containing the information passed in CONFIG.SYS following the =. This 
> string may end with either a carriage return (0D) or a linefeed (0A). 
> This information is read-only. Only system calls 01h-0Ch and 30h can 
> be issued by the initialization code of the driver."

In reality, many more calls work under DOS version greater than 3.1
at least.

Yes, I know Mr. Microsoft, this is undocumented and should not be
relied upon. I did find it strange that software distributed with
MSC7 (namely Qualitas' 386MAX) uses file I/O from a device driver
though to read it's configuration data from "386max.pro".  :-)

I just wished these things WERE documented, and the 'tricks' supplied,
if there are any.  The restriction on DOS calls in devide driver init
code is very unreasonable given the puny size of the command line in
most versions of DOS prior v5.0.


..............................................................................
david nugent          Public Access Usenet      "Only Nixon could go to China"
david@csource.oz.au     +61-3-792-3507                    - old Vulcan proverb
3:632/400@fidonet, 58:4100/1@intlnet, 199:4242/5@rainbownet, 33:300/6@admin
PO Box 260, Endeavour Hills, Victoria, Australia, 3802.