HDTenEightyP/NetNews huggingface dataset:
From: pp@wsinti01.info.win.tue.nl (Peter Peters)
Newsgroups: comp.lang.pascal
Subject: Re: Displaying numbers in hex
Date: 6 Apr 92 07:48:28 GMT
Reply-To: pp@info.win.tue.nl

In article <1992Apr2.152836.17959@sbcs.sunysb.edu> clane@libws1.ic.sunysb.edu (Charles F Lane) writes:
>    Write/WriteLn always display numbers in DECIMAL form.  Is there a
>built-in way to tell Write/WriteLn to display them in HEX, or do I need 
>to make a Decimal2Hex function?

I don't know if you are using TP 6.0 but I recently found out there is
a "formatstr" procedure in the "drivers" unit of TP 6.0 that does what
you seem to need, and some more too....
It is a poor implementation of the c routines that format strings
(like sprintf).

I think that if you only are in need of decimal to hex translation,
you're better off writing a simple function doing just that.
(or e-mail me and ask me  to send you what I use for displaying
bytes,words,integers,pointers.... in hex)

I thought I'd mention this on the net. I'm a reasonably experienced
TP user, but I stumbled upon this function just recently....

-- 
| Peter Peters                              | UUCP  : pp@win.tue.nl     |
| Eindhoven University of Technology (TUE)  | PHONE : +31-(0)40-474120  |
| Dept. of Mathematics and Computer Science | TUE   : HG 8.82 / 4120    |
| Disclaimer : I said WHAT ???              | VHF   : pa0ppe            |
Newsgroups: comp.lang.pascal
From: s1949782@titan.ucc.umass.edu (SpaceMan Spiff?)
Subject: TP 6.0 and __DATE__ __TIME__
Organization: University of Massachusetts, Amherst
Date: Sat, 11 Apr 1992 02:56:12 GMT


I'm using TP 6.0:

While working with Turbo Vision I would like to create an "about" box
that shows the date and time tha the program was compiled.

I know C has __DATE__ and __TIME__ does TP have anything similar?

I know I could read the date off of the file name but I don't want to
do that.  Also the about BOX is in a seperate TPU (not resourced) so 
I know I will need to build the entire program when I compile so that
it get updated  (If it can be done :)

Thanks, IA

-Matthew Crocker
s1949782@titan.ucc.umass.edu
"I'm only a CS student I DONT have a opinion"
From: ddxxdd@mixcom.com (Jeff Ding)
Newsgroups: comp.lang.pascal
Subject: Re: SetFTime in TP 5.5 - Have you made it work?
Date: 10 Apr 92 21:16:00 GMT
Article-I.D.: mixcom.1992Apr10.211600.6867
Organization: Milwaukee Internet Xchange BBS, Milwaukee, WI U.S.A.

In article <1992Apr9.151719.4594@csc.canterbury.ac.nz> cctr132@csc.canterbury.ac.nz (Nick FitzGerald, CSC, Uni. of Canterbury, NZ) writes:
>Anyone successfully used SetFTime in TP 5.5?  Mind letting me in on the
>secret?
>
>I've tried what it says in the Reference.  I've tried flushing the file,
>then closing it, then re-opening it, then SetFTime, then closing it.
>

I just compiled the sample program in the help for SetFTime and it
works just fine.  What you have to do is open the file for reading
before you issue the SetFTime call.

jeff.ding@mixcom.com
From: s1949782@titan.ucc.umass.edu (Matthew Crocker)
Newsgroups: comp.lang.pascal
Subject: Re: Getting PrefixSeg of TSR's from a non-TSR program.
Date: 16 Apr 92 19:20:13 GMT
Organization: University of Massachusetts, Amherst

In article <1992Apr16.173456.19151@sbcs.sunysb.edu> clane@libws1.ic.sunysb.edu (Charles F Lane) writes:
>    I am writing a TSR graphic image capture utility.  I am not dealing
>with writing to disk from within the TSR because of DOS non-reentrancy.

why don't you set up an interrupt on the clock.. so 18.2 times per
second you can check to see if there is any datato be written to the disk
if there is data then do it (making sure you are not going to screw up DOS)
that is (I believe) how most TSR's that have to output to a file do it

>Instead, I am storing the data in an array declared within the TSR.  Now,
>by knowing the offset of the array from the PrefixSeg of the TSR I can
>write the data to disk from a companion program which is non-TSR by knowing
>the PrefixSeg of the TSR.  For now I am writeln'ing the TSR PrefixSeg when
>the TSR is loaded and telling the user to remember it.  Then when the
>non-tsr program is run it asks for the PrefixSeg that was displayed by the
>TSR so it knows where the data array is located in memory.  Pfew!  This all
>works fine and dandy.
>

what happens if you're captureing a big graphics image (1024x768x256)
 that is alot of data to keep in memory (huge array). it would be better 
if you wrote to the disk as you went along......

>MY PROBLEM: I don't want to require the user to remember the PrefixSeg
>            of the TSR.  Is there a way for my non-tsr program to find 
>            out the location (PrefixSeg) of my TSR in memory automatically?
>
>   I have thought about embedding a specific sequence of byte-sized values
>in the TSR, that way I could do a pattern match through the system memory to
>locate my program.  The problem is there just may HAPPEN to be the same
>sequence randomly stored somewhere in memory already -- you never know!
>Who knows? Your name may be in there somewhere in the form ord(firstletter),
>ord(secondletter), etc!  Maybe I'll write a program that searches for one's
>name in memory just for the fun of it!

Have you thought about using the MultiPlex Int?  I forget what int number
it is but you could load your TSR id in ax and a command in DX and 
call the int.. have your TSR when it get the command return the Pseg in AX

>
>-- 
>                          |"There are pearls to be had here, but you have to
>Charles F. Lane           |break open the oysters."  My geology prof to a class
>clane@Libws1.ic.sunysb.edu|w/no questions at a review 2 days before an exam.

-Matthew Crocker
s1949782@titan.ucc.umass.edu
Newsgroups: comp.lang.pascal
From: s1949782@titan.ucc.umass.edu (Matthew Crocker)
Subject: __DATE__ __TIME__
Organization: University of Massachusetts, Amherst
Date: Mon, 13 Apr 1992 17:04:43 GMT

I'm trying to write a simple "about box" in TP 6.0.

everything works fine,  what I would like to do is to have a line
in the about box stating when the program was last built.

I know C has __DATE__ which works but I want to know if there is a 
similiar function in TP...

the About box is in its own unit and is not resourced


-Matthew Crocker
s1949782@titan.ucc.umass.edu
From: dalessan@clam.rutgers.edu (Gene Dalessandro)
Newsgroups: comp.lang.pascal
Subject: Random nums
Date: 8 Apr 92 00:34:40 GMT
Distribution: usa
Organization: Rutgers Univ., New Brunswick, N.J.

Could someone please send me a random number generator in
Pascal...It's driving me NUTS!  Does anyone know if
Unix sunOS has a built in function....HELP ME, PLEASE!

Thanks a' bunch

dalessan@clam.rutgers.edu
From: gt8834a@prism.gatech.EDU (William Lang)
Newsgroups: comp.lang.pascal
Subject: Re: How Can I Delete An Entire Directory?
Date: 17 Apr 92 16:25:53 GMT
Organization: Georgia Institute of Technology

In article <1992Apr16.004637.925@javelin.sim.es.com> tpehrson@javelin.sim.es.com writes:
>i would like to do the equivalent of 'delete c:\msg\*.*' from TP5.0.
>unfortunately, i was not able to nail down exactly how to do this.  my nifty
>manual pointed me in the direction of FSEARCH; however, it appears as though
>wildcards are not accepted.

Well, there are two ways that I know of to do this...a fast way and a 
reliable way.  The fast way is to call the DOS FCB delete function,
specifying your own FCB.  It'll purge *.MSG faster than anything 
you can hope to do in Pascal.  The second way is to use Findfirst/Findnext,
assign each *.MSG to a file handle, and erase them.

I recommend the first way, but on some setups it fails for unknown reasons.


Newsgroups: comp.lang.pascal
From: cs201139@umbc5.umbc.edu (cs201139)
Subject: Alphabetizing
Organization: University of Maryland Baltimore County, Academic Computing Services
Date: Fri, 17 Apr 1992 18:15:20 GMT

I have created an array of words (no duplicates) and would like to write a
procedure which will sort them in alphabetical order. If anyone has some
simple source that I can change around to implement into this program or knows
where I can get a procedure for this please reply via E-Mail...
From: mongo@maple.circa.ufl.edu (Bryan Slatner)
Newsgroups: comp.lang.pascal
Subject: Heap destroyer
Date: 3 Apr 92 13:50:39 GMT
Article-I.D.: math.1992Apr3.135112.12778
Reply-To: MONGO%oak.decnet@pine.circa.ufl.edu
Organization: The CIRCA Underground

Does anyone know of a way to DESTROY all variables allocated on the TP60 heap?
There is a point in my application where I need to abort everything and jump
way back to a previous location.  The jumping is no problem; what I need to do,
however, is destroy any and all variables that have been allocated on the heap.
Borland suggested that I might try walking the heap list and disposing in-
dividual allocations, but I've no idea how to accomplish this!

Any help would be appreciated!

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
mongo@maple.circa.ufl.edu
Bryan Slatner, aka Marimaxx, aka Dedalus, aka Paradox, aka Mongo
President of Dedaparamaxxaginos Productions

Catapultam habeo.  Nisi pecuniam omnem mihi dabis, ad caput tuum saxum
immane mittam.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
From: shen@nil.IRO.UMontreal.CA (Yu Shen)
Newsgroups: comp.lang.pascal
Subject: Define colors of view
Date: 16 Apr 92 21:01:55 GMT
Organization: Universite de Montreal -- Laboratoire Incognito

I'd like to know how to choose colors in Turbo Vision. In the
manual, it is said that palette should be redefined. But I couldn't
figure out the codes of color attributes. By comparision with palettes
of the standard view objects, one can pick limited numbers of colors.
But it is very few. For example, I want to have a view with red on
blue, what should I do? 

And can one change the colors of a view at run time?

Thank you very much,

Season's greeting,

--
Yu Shen
Dept. d'Informatique et Recherche Operationnelle
University de Montreal, C.P. 6128 Succ. A.
Montreal, Que. Canada, H3C 3J7

(514) 342-7089 (H) shen@IRO.UMontreal.Ca
From: bryant@perlis.mcs.gvsu.edu (John Q. Public)
Newsgroups: comp.lang.pascal
Subject: Programming the Printer in TP6
Date: 14 Apr 92 20:26:16 GMT
Organization: The Alex Lifeson Fan Club

Can anyone recommend any books that deal with how to print graphics using
TP6?  I need to print some simple cirles and stuff from the GRAPH unit.
Thanks,
JQP
From: lagrouw@l-gw (Danny Lagrouw)
Newsgroups: comp.lang.pascal
Subject: Re: Resetting IOResult
Date: 15 Apr 92 14:10:34 GMT
Organization: Erasmus Universiteit Rotterdam
Originator: news@mailgate.eur.nl

bryant@perlis.mcs.gvsu.edu (John Q. Public) writes:

>Does anyone know how to reset IOResult to zero after taking care of an
>error condition?  My code looks something like this:
>{$I-}
>    perform I/O
>    IF IOResult <> 0 THEN
>        write(errormsg);
>{$I+}
>    

Try to rewrite it like this:

   {$I-}
   perform I/O
   {$I+} { Right behind the I/O action }
   IF IOResult<>0 Then
     Write(ErrorMsg);

After the first time you "use" IOResult, it should then automatically be
reset to 0.

Danny Lagrouw
lagrouw@l-gw.eur.nl
Organization: Doctoral student, Architecture, Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.lang.pascal
Date: Tue,  7 Apr 1992 20:50:03 -0400 
From: Khee Poh Lam <kl2g+@andrew.cmu.edu>
Subject: AppMaker Software

Can anyone with experience using AppMaker and Prototyper software on the 
Mac tell me which is a better development tool to use and why?

Thanks.


Khee Poh

Newsgroups: comp.lang.pascal
From: clane@libws1.ic.sunysb.edu (Charles F Lane)
Subject: Re: Fast Get/Put Pixel routines needed
Organization: State University of New York at Stony Brook
Date: Mon, 13 Apr 1992 18:07:39 GMT

In article <35085@uflorida.cis.ufl.EDU> sab@reef.cis.ufl.edu (Shawn Berg) writes:
>I'm looking for some code that will have the same behavior as GetPixel
>and PutPixel, but is much faster, to use with TP6 in VGA mode.  Can 
>anyone tell me where I could find something like that?
>Thanks,
>Shawn Berg

    By knowing which mode you want to use and the location of the video
memory you can access it directly.  I only know the address of VGA mode 13h
which is $A000:0000, but I have a tech ref and can look up the other modes
if you need them.  For the 320x200 256color mode 13h a pixel at (x,y) can
be written to or read from mem[$A000:320*y+x].

 Examples:
 
  -Put a pixel with color 15 (white for standard palette) at (50,75):
    begin
     Mode13HEXInitRoutine;
     mem[$A000:320*75+50] := 15;
    end.

  -Read a pixel at (90,125):
    var colornum : byte;
    begin
     Mode13HEXInitRoutine;
     colornum := mem[$A000:320*125+90];
    end.

-- 
~~~~~~~ I'm (sine)waving goodbye!  | Bo knows football, basketball, baseball,
Charles F. Lane                    | hockey, diddley, etc.  But does he know
clane@Libws1.ic.sunysb.edu         | computers?!
From: dtiberio@csws7.ic.sunysb.edu (David Tiberio)
Newsgroups: sbcs.cse114,comp.lang.pascal
Subject: pascal trouble
Date: 12 Apr 92 01:14:09 GMT
Distribution: na
Organization: State University of New York at Stony Brook


	I am doing a sort routine for my database. Unfortunately,
all of the empty cells are being placed first in the record
while all of my real data is at the end. I have thought of ways
of living with this, but would rather get those blank cells at the
end. 

	I have tried making a null string, and checking if each 
name in the record is greater or lower, but it is finding that all
of them are lower, which doesn't help. I even changed the null to a
real name and it still didn't work; it just erased my data up until
that point. 

	What is the best way to set a name to a null? I have a string
of 50 characters. The only easy way I have thought of is to change
the name to all z's. Is there another way to do this? maybe a higher
ascii code?

-- 
      //   David Tiberio  SUNY Stony Brook 2-3662  AMIGA  DDD-MEN   
     //  Not the llama! Come here Earl; I want to tell you something...
   \X/  Liverpool, New York	flames to suggestions@cbmvax.commodore.com
From: back@ds9.scri.fsu.edu (Philippe Backouche)
Newsgroups: comp.lang.pascal
Subject: Pascal Grammar for Yacc
Date: 14 Apr 92 20:25:40 GMT
Reply-To: back@ds9.scri.fsu.edu (Philippe Backouche)
Organization: SCRI, Florida State University


    Does anyone have a pascal grammar for yacc ? If so , could he possibly email it
    to me???
     
				   Thanks in advance...

				      Philippe Backouche
				      back@ds9.scri.fsu.edu
Newsgroups: comp.lang.pascal
From: cs201139@umbc5.acslab.umbc.edu (cs201139)
Subject: Decompilers
Organization: University of Maryland Baltimore County, Academic Computing Services
Date: Fri, 17 Apr 1992 18:24:46 GMT

Do pascal decompilers exist? Or decompilers for other languages like C...
I'd really like to get my hand on one if they have them which will work on
a 486.
From: bobb@vice.ICO.TEK.COM (Bob Beauchaine)
Newsgroups: comp.lang.pascal
Subject: Re: How do you tell when a user has lifted a finger OFF of a key?
Date: 16 Apr 92 22:01:43 GMT
Organization: Tektronix, Inc., Beaverton,  OR.

In article <30070@adm.brl.mil> J_SCHULL@acc.haverford.edu (Jonathan Schull) writes:
>I'm using Turbo Pascal...

  You may be using Turbo Pascal, but you're going to have to use
  BASM or seperately linked .obj files for this one...

  You'll need to write a keyboard interrupt handler.  Turbo provides
  no support for what you want to do, but the BIOS does.  

  Interrupt 9 is the standard PC keyboard interrupt.  When a key is
  pressed, the scan code (not the ascii value) is placed into the
  keyboard buffer in low memory.  When that same key is released,
  the key scan code with the hi bit set is then placed immediately
  after the keypress in the buffer.  Note that both events generate
  a hardware keyboard interrupt to occur.  

  You'll want to monitor the keyboard through the interrupt handler,
  watch for your key of choice, and then watch for that same scan
  code OR $80.  At this point, the selected key has been released.

  Anything more advanced than this brief explanation would require
  several pages of code and explanation.  Look up a good reference
  on TSR's and you'll probably find most of what you need to know to
  implement a strategy like this.

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

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: dtiberio@csws7.ic.sunysb.edu (David Tiberio)
Newsgroups: sbcs.cse114,comp.lang.pascal
Subject: Re: pascal trouble
Date: 12 Apr 92 03:44:02 GMT
Distribution: na
Organization: State University of New York at Stony Brook

In article <1992Apr12.024103.27635@sbcs.sunysb.edu> dtiberio@csws7.ic.sunysb.edu (David Tiberio) writes:
>
>	I have to do a database option where the user presses
>RETURN if he does not want the data changed. The string read
>in is an array of length 9. This is what I tried:
>
>	if string = '         ' then data_does_not_change;
>
>	This line is not being read for some reason the way
>I would expect it to. Should this work? It could be that I forgot
>something somewhere else, but I have had problems like this
>throughout this program.

	I solved this problem. It ends up I was messing
with the difficulty string instead of the name string!
Well, at least it only took me a few hours this time...


David Tiberio - user of Standard Pascal, the Miracle Language

I can't wait to start writing operating systems in Pascal. Or maybe
some artificial intelligence software that can write Pascal programs.
It would probably get a better grade then I would, so I could use
it to do my homework assignments.



				Sincerely,
				R2x ver 2.03.01

-- 
      //   David Tiberio  SUNY Stony Brook 2-3662  AMIGA  DDD-MEN   
     //  Not the llama! Come here Earl; I want to tell you something...
   \X/  Liverpool, New York	flames to suggestions@cbmvax.commodore.com
From: awilliam@qucis.queensu.ca (Majik)
Newsgroups: comp.lang.pascal
Subject: Re: Units using Units
Date: 7 Apr 92 16:10:30 GMT
Organization: Computing & Information Science, Queen's University at Kingston

I think that the solution is as follows:  

  The process of compiling into an exec will combine the necessary functions
  from the TPU's into ONE file.

  The process of compiling in a TPU will indicate (within the TPU) what
  functions are available from the other TPU's... but these functions 
  are NOT copied into the newly compiled TPU. 


  Compiling A (into a TPU) wich references B.TPU: A is left with 
  references to B.. not copies of B's functions.

Thus you will require BOTH TPU files. The compiler will then determine 
which functions within each TPU are accessed, and will include these in 
the final output.
-- 
| This message brought to you by the Amalgamated Union of Philosophers, |
| Luminaries, and other professional thinking persons.                  | 
|              ( awilliam@qucis.queensu.ca )                            |
From: lopes@cogsci.ucsd.EDU (alann lopes)
Newsgroups: comp.lang.pascal
Subject: Frontier Software Pascal $150 (TP compatible protected mode compiler)
Keywords: Protected mode Borland Frontier Software
Date: 9 Apr 92 15:50:58 GMT
Article-I.D.: cogsci.1315
Organization: University of California, San Diego



     Does anyone have any experience with Frontier Software's
     TP compatible compiler?  They claim that it can generate
     protected mode code with full TP5.0 compatibility with a
     royalty free Dos extender (TP6.0 compatibility to be released
     in May).  For $150, this doesn't sound bad.  Would some kind
     individual please enlighten me on the pros and cons of this
     compiler.

     Does anyone know of Borland's plans for protected mode support?

                               Thanks very much

                                    alann


   alann lopes:        alopes@ucsd.edu       -- internet
   (619) 534-7417      ALOPES@UCSD           -- bitnet
From: u1625@JSP.UMontreal.CA (Pigeon Steven)
Newsgroups: comp.lang.pascal
Subject: Re: Help with pointers
Date: 8 Apr 92 14:41:55 GMT
Organization: Universite de Montreal

In article <rscd4INNaeo@chester.ksu.ksu.edu> holland@chester.ksu.ksu.edu (Rich Holland) writes:
>
>rind@binoc.bih.harvard.edu (David Rind) writes:
>
>>> ["Error 204:  Invalid pointer operation"]  
>
  (...)

>Heap though -- I'm going to try increasing the heap size and test it, for
>curiosity sake.  
>
> 
>-- 
>Rich Holland             | INTERNET:  holland@matt.ksu.ksu.edu
>419 Marlatt Hall         | BITNET  :  holland@ksuvm
>Manhattan, KS  66506     | UUCP    :  ...rutgers!matt.ksu.ksu.edu!holland
>"Jesus saves...but Gretzky gets the rebound!  He shoots!  He scores!!"

Well, 204 is more likely to create an error when the pointer is nil, or
when the pointer is set to some value that does not match with the Heapman
tables. If you dispose/freemem a nil or random pointer, you'll get exactly
the same error. Maybe, once in a while, you where disposing a pointer that
was not yet newed/getmemed... I got the bug a couple of time, too, but as
I looked in that direction, I found the bug quite quickly.


-- 
 _ ___  __       __ _  | Steven Pigeon
(_  |  (__ \  / (__ |\ | alias Garfield (for my temper, I guess)
__) |  (__  \/  (__ | \| U1625@JSP.UMONTREAL.CA
==Computer Science & Operation Research, Universite de Montreal==
From: albert@cs.uq.oz.au (Albert Ng)
Newsgroups: comp.lang.pascal
Subject: TVGOBJ - author reconsideration
Summary: The Author of TVGRAPH seeks for financial support
Keywords: TVGOBJ
Date: 11 Apr 92 10:46:31 GMT
Reply-To: albert@cs.uq.oz.au

Dear Friends,
	I have been talking to the author of the TVGraph unit.
	Mr. Christopher Burke had left me a message saying that
	he would be glad to reconsider continuing the project
	on the TVGOBJ unit which will allow objects other than
	a st. line to be drawn within a TVision window, providing
	that some sort of financial reward regarding to the work
	involved.

	I haven't obtained the details on the arrangement yet.
	However, I would like to know if anyone (hopefully a lot)
	would be interested in purchasing the final product of the
	project. I will keep you updated on the details of the
	cost arrangements as they come to my knowledge.

	Thank You for your response on this matter in advance!!

Yours,
Albert Ng
BIT.Hons.
Uni.Of.Qld.
Aus.