HDTenEightyP/NetNews huggingface dataset:
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Look-a-head (input^) in TPASCAL...???
Organization: Queen's University
Date: Mon, 25 Jan 1993 02:12:25 GMT

In article <35202@adm.brl.mil> ISAACSON@husc3.harvard.edu (RON ISAACSON) writes:
> 
>That "file buffer variable", as it's called, is something I missed
>sorely when I went over to Turbo Pascal. I wrote a little function
>to replace it. This thing is by no means foolproof, and there are
>probably several modifications that could be made, but in general
>for just looking one byte ahead in a file this function works fine.
> 
>function filebuff(var infile : text) : char;
>  var
>    fp : longint;
>    ch : char;
>  begin
>    {$I-}                  { turn off i/o checking, end of file, etc.    }
>    fp := filepos(infile); { get the current position into the open file }
>    seek(infile, fp + 1);  { move the pointer ahead by one               }

??? Neither Filepos nor Seek work for text files in BP 7.  Which version are
you using?  

If you want to peek ahead at the next character, you have to implement
FilePos and Seek for text files (which may be what you did), or work at the 
text file device driver level.

Duncan Murdoch
Newsgroups: comp.lang.pascal
From: chris@inconel.uucp (Christian)
Subject: swapping to disk routine
Organization: U of Wisconsin-Madison College of Engineering
Distribution: world 
Date: 22 Jan 93 13:57:29 CST

I'm looking for a decent replacement for exec() that allows swapping
your program to disk while it executes the external program. I've taken
a look at swapunit, but was not impressed (old version?) Any help
would be appreciated!

-Christian

Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Variant records
Organization: Queen's University
Date: Sat, 23 Jan 1993 20:57:06 GMT

In article <1993Jan23.140159.10176@wariat.org> sjsobol@wariat.org (Steven J. Sobol) writes:
>I consider myself a pretty knowledgable Pascal programmer, but there is 
>one thing I haven't been able to figure out. When you have a variant
>record such as the following

>var  Rec : record
>    case Boolean of
>      ( True:  BigNumber: LongInt; )
>      ( False: ALongInt: LongInt; )
>end;

>how does the computer resolve a reference to Rec.Bignumber as opposed to
>Rec.LongInt? Could I use an ordinal value instead of a Boolean, like this:

It doesn't.  Those are exactly equivalent.  I'm not sure if standard Pascal 
forces you to declare a tag field (e.g. "case Choice:Boolean of ..") and
then makes sure that your references are consistent with the value there, 
but TP certainly doesn't.

Duncan Murdoch
From: ATURNER@rcnvms.rcn.mass.edu (Alan Turner)
Newsgroups: comp.lang.pascal
Subject: String capture from serial port for TPW use
Date: 28 Jan 93 14:34:21 GMT

Date sent: 28-JAN-1993 

I am interacting with a text based Unix backup program from within 
windows on a remote pc.

My TPW skills leave much to be desired at this point.

How can I take a prompt from the serial port such as:
"Please insert tape #### on unit ## and type ok when ready"

 ... and cause it to trigger a dialog box which will do the same thing?
                                                                 


-=Alan Turner=-                
-=Email: aturner@ecn.mass.edu=-
From: berend@contrast.wlink.nl (Berend de Boer)
Newsgroups: comp.lang.pascal
Subject: Protected Mode Tips Bugfixes
Date: Thu, 21 Jan 1993 20:40:58

Hello Protectors,

Of course, a few hours after my message has been released to the net,
bugfixes seem necessary )-:

Some minor bugfixes:

* In the example about allocating memory below the 1MB, memory is
  allocated but not released. As we have only 1MB down their, this can
  become a problem ;-)
  Fix:  adding the statement
    GlobalDosFree(RealModeSel);
  will clean things up

* The solution to interrupts which requires parameters passed on the
  stack has a bug. The
    les  di,Regs
  statement does not work of course. Replace by
    mov  di,OFFSET Regs
    mov  dx,SEG Regs
    mov  es,dx
  This does not work when Regs is declared in the stack segment (well
  done Borland....), you encounter bug number 16, just as I did.... (see
  next message)


Groetjes,

Berend. (-:
fido: 2:281/527.23
email: berend@contrast.wlink.nl

Newsgroups: comp.lang.pascal
From: martijn@cs.vu.nl (Lemmens ML)
Subject: Changing from "no caption" to "caption"
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Date: Sat, 23 Jan 1993 20:12:28 GMT


I'm using BP 7.0 for Windows to create a childwindow without a
caption. With this I mean:

    Attr.Style = ws_ChildWindow and not(ws_Caption);

When some event takes place, I want do add a caption to the window and
display a title using SetCapture(...).

Is this possible? without destroing the window and creating a new one?

Martijn

Newsgroups: comp.lang.pascal
From: delozier@condor.mcs.kent.edu (Greg Delozier)
Subject: Re: Think Pascal or MPW Pascal
Organization: Department of Mathematics and Computer Science, Kent State University
Date: Fri, 29 Jan 1993 00:40:50 GMT

In article <C1Kq2s.DEv@cs.columbia.edu> guapo@cs.columbia.edu (J. Robert Diana) writes:
>
>I need a Pascal compiler for the Mac LCII and was wondering which was better
>Think Pascal or MPW Pascal?  Is there a comparable shareware compiler?
>And the final question is an FPU neccesary (for some compilers it is)?
>Thanks for any suggestions.
>
>Rob Diana
>
Get THINK Pascal! It's a truly great product. It doesn't require an FPU
but will use one.  It has a lot of nice features for a development environment
and doesn't cost much. 

I've done some quite large programs in it with no problems.

-greg


Newsgroups: comp.lang.pascal
From: ISAACSON@husc3.harvard.edu (RON ISAACSON)
Newsgroups: comp.lang.pascal
Subject: Re: Look-a-head (input^) in TPASCAL...???
Date: 26 Jan 93 02:41:21 GMT

=> ??? Neither Filepos nor Seek work for text files in BP 7.  Which version
=> are you using?  

Well, I am using Turbo Pascal 6.0, but you are right, a little typo
on my part. Change that TEXT to FILE, or to one of your own user-
defined file types (like "Type IntFile = File of Integer") and you 
should be fine!

 - Ron Isaacson, Isaacson@Husc3.Harvard.Edu
From: leonard@qiclab.scn.rain.com (Leonard Erickson)
Newsgroups: comp.lang.pascal
Subject: NaN and comp type
Keywords: comp, NaN
Date: 23 Jan 93 07:29:40 GMT
Article-I.D.: qiclab.1993Jan23.072940.22388
Reply-To: Leonard.Erickson@f51.n105.z1.fidonet.org
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.

According to the TP6 manual, NaN is represented for the comp type
by a value of 0, with a sign bit of 1. But if you *create* such a
value TP 5.5 and TP 6.0 both treat it as a *large* negative 
number (-9.22337203685478E+0018) 

So is it broken, or are the docs wrong? I was *hoping* to use it 
to mark uninitialized values. <sigh>

-- 
Leonard Erickson		      leonard@qiclab.scn.rain.com
CIS: [70465,203]			 70465.203@compuserve.com
FIDO:   1:105/51	 Leonard.Erickson@f51.n105.z1.fidonet.org
(The CIS & Fido addresses are preferred)
From: tswingle@oucsace.cs.ohiou.edu (Tom Swingle)
Newsgroups: comp.lang.pascal
Subject: Re: [BP7.0] Syntax colors
Date: 21 Jan 93 23:56:54 GMT
Organization: Ohio University CS Dept,. Athens

I think the most important thing with syntax highlighting is not to try to
come up with a unique combination for every different entry; it will make it
into an unreadable jumble of color.  I have a blue background, with reserved
words in white, assembler in green, comments and strings in light gray, and
everything else in yellow.  Some of the categories listed are kind of silly,
especially whitespace and numbers (IMHO, of course; I am just waiting for a
nasty flame from someone who just loves numbers in bright red on green :-).
Color highlighting for whitespace?  *Snicker*.  Sure, you can change the 
background, but it seems to me that changing the background for anything
makes things totally unreadable.  Anyway, it might be enough to just 
separate reserved words from everything else.  And choosing something subtle
like yellow vs. white or light gray vs. white can help if you find contrasting
colors unpleasant.

Oh well, have fun with it.  Choosing syntax colors was one of my favorite
parts of trying out the new upgrade.
-- 
"The problem you are experiencing is  |  "To be sure of hitting the target, 
not with the network nor with the     |  shoot first and, whatever you hit, 
station.  Please adjust your set."    |  call it the target." 
More ramblings from: tswingle@oucsace.cs.ohiou.edu/tswingle@bigbird.cs.ohiou.edu
Newsgroups: comp.lang.pascal
From: boie@prince.DKRZ-Hamburg.DE (Markus Boie)
Subject: generic parser source anywhere?
Organization: Deutsches Klimarechenzentrum GmbH, Hamburg
Date: Sat, 23 Jan 93 02:06:31 GMT

I'm looking for some parser source code to include in my TP programs.
A generic one would be great, I'd love to have a VMS/DCL like interface
for my programs.

Any hints? Thanx,

Markus
Newsgroups: comp.lang.pascal
From: focke@gmd.de (Stefan Focke)
Subject: Re: Font troubles
Organization: gmd
Date: Tue, 26 Jan 1993 10:06:12 GMT

In article <1993Jan18.203540.6089@lunatix.uucp> shudes@lunatix.uucp (Chris Shudes) writes:
>From: shudes@lunatix.uucp (Chris Shudes)
>Subject: Re: Font troubles
>Date: Mon, 18 Jan 1993 20:35:40 GMT
>I have experimented a little bit, and played around with the
>CreateFont API function.  However, this function does not acheive
>what I am looking for.  What I need is to be able to load a
>specific TrueType font.  The CreateFont only loads a matching
>font, which is to imprecise for my use. 
>
>Also, how do I go about using the Font selection dialog (i.e the
>one the Write uses to let users select the current font).  If Ic
>could get a hold of that dialog, then it might show me how to get
>and load a truetype font.
>
>Could someone please lead me in the right direction, an example
>would be priceless!  Thanks.
>
>-- 
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>Chris Shudes                            
>Lunatix Public Access, Lexington, KY 
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Hello!

If you want it could mail or post a piece of code. It uses the 
CreateFontIndirect-call. Why do you think, that this does not use the font 
you specify in the lfFaceName parameter?

Stefan

----------------------------------------------------------------------

Stefan Focke                  Tel. 02241-14-3154
GMD-I8                        e-mail: stefan.focke@gmd.de
Postfach 1316
D-W 5205 Sankt Augustin 1
From: commari@uta.fi (Juha Korhonen)
Newsgroups: comp.lang.pascal
Subject: ADT & BTW7.0??? Help me!
Date: 25 Jan 93 14:27:33 GMT
Distribution: world
Organization: University of Tampere, Finland

Is it possible to define abstract data types in units of Borland's Turbo
Pascal 7.0??? If I've any hope, would you followup here or send mail me a
little examle or something?
I'm in a little hurry with this.
Thanks!




Newsgroups: comp.lang.pascal
From: pf@bilbo.bio.purdue.edu (Paul Furbacher)
Subject: Re: TSrcollBar -- kudos to Berend de Boer
Followup-To: comp.lang.pascal
Organization: Purdue University
Date: Thu, 21 Jan 1993 20:46:10 GMT

In article <727571597.AA01162@contrast.wlink.nl>, berend@contrast.wlink.nl
(Berend de Boer) wrote:

in response to my question as to whether ...

> ... Maybe someone else has a better idea?  
> 
BdB> In another newsgroup (actually area: PASCAL.028, fidonet) I suggested
to
BdB> Erwin overriding the ScrollStep method. These would do I think.

Excellent idea.  This points out how good the TV library is
sometimes, but it's not always that you can get to the events
which are "hidden" by way of conversion.  And it also points out
how you really have to study the manual and the TV source code. 

Good job, Berend!

Pardon my ignorance, but what is "PASCAL.028" and why "fidonet" when
I have "internet"?
Newsgroups: comp.lang.pascal
Subject: Text windows WITHOUT OOP
From: Doug ! <JDG111@psuvm.psu.edu>
Date: Fri, 22 Jan 1993 21:24:38 EST
Organization: Penn State University

Anyone know of any good text windowing units/packages which do NOT require
the programmer to use Object Oriented Programming?  Turbo Vision is nice, I
don't have the time to re-learn everything right now.  I know there's GOT to
be something written out there to help me out, I just don't know what, or
where.  If YOU do, drop me a line.

--Gracias.

Doug Good
Penn State University
Newsgroups: comp.lang.pascal
From: greaham@a.cs.okstate.edu (GREAHAM DARIN DONA)
Subject: Need Help with Resource and Init
Organization: Oklahoma State University, Computer Science, Stillwater
Date: Tue, 26 Jan 93 22:37:19 GMT



   I am attempting to place a derivation of a dialog box's Init constructor
into a resource file.  The problem that arises is that the HandleEvent for
the dialogbox no longer works.  I seem to be doing something dreadfully
wrong but can't quite put my finger on it.  Simple type declaration:

   Type 
     PBox = ^TBox;
     TBox = Object(TDialog)
        constructor Init;
        destructor ...
        procedure HandleEvent...
     end;


   Now that the Init is all in a resource file, using 
          Box := New(PBox,Init)

   won't work, of course.  But
          Box := PBox(ResFile.Get('DialogBox'));

   will but the HandleEvent doesn't respond.  I'm not for sure what to do
past this point.  I've tried numerous things but nothing works.

BTW: The dialog box that is in the resource file is NOT inherited from 
     PBox, should it?? 



   Thanks for any help.

   Darin...
From: d92magax@odalix.ida.liu.se (Magnus Axelsson)
Newsgroups: comp.lang.pascal
Subject: Re: help
Date: 24 Jan 93 15:44:16 GMT
Organization: CIS Dept, Univ of Linkoping, Sweden

csfraw@vehka.cs.uta.fi (Francis Akoto) writes:

>This is a pascal code which i thought was wrong : can anyone out there explain
>what values i gets ( or can it be written in another way )

>var    i,j: integer ;
>.....
>....
>    i := i or j ;
>......


>--
>gallows
>     Opinions are like assholes;
>     Everybody has one but nobody wants to look at the others.


The operand OR works on the bitpattern of the integers you defined
according to the following example:

i:=19;                  (* in binary 0000 0000 0001 0011 *)
j:=65;                  (*           0000 0000 0100 0001 *)
i:=i OR j;    (* Will set i to 83    0000 0000 0101 0011 *)

If any of the two bits (or both) in a column of i and j are set the same
bit will be set in the result.


Happy programming!

Magnus Axelsson,
Student at University of Linkoping, Sweden
d92magax@und.ida.liu.se
From: demetrio@cs.concordia.ca (DAVLOUROS demetrios)
Newsgroups: comp.lang.pascal
Subject: Function as parameters in procedures
Date: 23 Jan 93 21:53:27 GMT
Organization: Computer Science, Concordia University, Montreal, Quebec


    Hi there,

I am trying to pass functions as parameters in a pascal program I dont seem to able to do it.
If anyone there has an idea I will apreciate if he/she could help me

Thank you in advance

-- 
| demetrio@cs.concordia.ca          d_davlo@pavo.concordia.ca |
|james@hpb.hwc.ca                    jdavlouros@hpb.hwc.ca    |

| Women , you can't live with'em, pass the beernuts._ N.P.     |
Newsgroups: comp.lang.pascal
From: max@gargoyle.uchicago.edu (Max Ziff)
Subject: Pascal Standards Questions
Organization: Department of Computer Science, University of Chicago
Date: Sun, 24 Jan 1993 17:37:38 GMT

I have a few more questions about Pascal standards.

1) The report specifies "conformant-array parameters".  Are these
widely implemented?  Is this part of any emerging specification?  What
is the most portable, most polymorphic way of writing a function that,
say, takes the average of the elements of an array which it is passed
as a parameter?

2) Is there any standard for signalling errors?  Is there a portable
way of signalling the same error that is generated at run-time by
divide-by-zero?  Are run-time errors part of any standard?

3) Is there a portable, standard way of generating a value NaN?

Thanks in advance.

--
Donald Ziff (Max)         Department of Computer Science
                          University of Chicago
                          1100 E. 58th Street, Chicago, Illinois   60637
                          ziff@cs.uchicago.edu
From: Seppo.Tuomivaara@cc.kemira.kemira.mailnet.fi
Newsgroups: comp.lang.pascal
Subject: Re[2]: Date/time manipulation
Date: 26 Jan 93 12:39:29 GMT

ts@uwasa.fi (Timo Salmi) writes:

> In article <currin.27.727945571@unpsun1.cc.unp.ac.za>,
> currin@unpsun1.cc.unp.ac.za writes
> >  23/01/93, 00:01:31, 31, NAME OF SOMEONE
> >This represents that time and date that someone exited the program
> >followed by the minutes that they were using the software.
> >Does anyone have any code that takes a minutes figure away from the
> >date and time ?
>
> Huh? If it is in a fixed postition, just have to use the Copy
> keyword to extract pertinent parts from the string, and then
> recombine eg with +.  Look up the Copy keyword.  This is rather
> trivial.
>

I believe that he wants to do a julian subtract from the date, not to
copy a section of the string.

f.x.

 23/01/93, 00:01:31, 31, UserName   ->  23/01/93, 00:01:00

which is not as trivial (unless you use TP/BP and got the Turbo/Object
Professional library from Turbo Power).

Anyone with good shareware/PD date routines out there ?
Please drop currin@unpsun1.cc.unp.ac.za a line !

Lars F.

There are some date/time functions in /pc/turbopas/goodies.zip at garbo.uwasa.fi

-- Seppo Tuomivaara
   Kemira, Oulu, Finland
From: astoner@mcis.messiah.edu
Newsgroups: comp.lang.pascal
Subject: Loading from a Stream
Date: 24 Jan 93 04:31:45 GMT

Hello all,
  This is a question for all you stream experts out there.  I am working
on a portfolio tracking program that involves four different types of
transactions (Stock, Bond, Options, Future).  Sounds like these four
types of transaction should be a descendant of a Transaction type, which
is the descendant of TObject so it can be streamed.  All of the general
data is stored in the Transaction type which also defines several virtual
methods which are overridden in the specific types.  The data unique to
each specific type of transaction is of course stored in them.
  Right now I have the specific types LOAD(ing) and STORE(ing) all of the
fields.  Is it possible to call the ancestors LOAD method to LOAD that part
of the data then continue with the specific data?
  The more important problem that I am having is that when I store something
on the stream I am having problems reading it back.  I can't seem to get
it to call the proper LOAD method for the specific types.  If I have a
variable that is a pointer to the Transaction type isn't it supposed to
call the methods of the descendants, or something like that?
  One of the methods defined in the base Transaction type is an ID method
that is to return the type of transaction that is stored in the base
transaction type.  When I load the data back from the stream shouldn't I
be able to call this ID method to determine how to type cast the loaded
data?
  If I can't get this to work the way I think it is supposed I'll either
go back to a less elegant way of doing it or just maintain four lists of
transactions as well a four different streams for each type of transaction.
Neither of which I really care to do.
  Hope this makes a little bit of sense.  If you have any ideas, or need
something clarified, please send me a message.

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

Item Subject: signature
--------------------------------------------------------------------------------
  Allen E. Stoner                       Internet: astoner@mcis.messiah.edu
  Academic Application Programmer                 Messiah College
  Voice:  (717)766-2511 ext. 7109       Fax:  (717)691-6002
--------------------------------------------------------------------------------
From: ZCCBJSB@eb0ub012.bitnet (Josep Sau)
Newsgroups: comp.lang.pascal
Subject: integer/string generic
Date: 27 Jan 93 11:03:06 GMT


 
>from: "r. patel" <rpatel@massey.ac.nz>
>subject: string and integer conversion (mac and pc) - help
>date: 25 jan 93 20:25:22 gmt
>to:       info-pascal@brl.mil
>
>anyway i've got a pascal prog. on the mac which uses the sane library
>functions int2str and str2int (ie converts a string to integer and
>viceversa).
 
>from: patrick pollet <ppollet@cismibm.univ-lyon1.fr>
>subject: re: string and integer conversion (mac and pc) - help
>date: 26 jan 93 08:25:59 gmt
>to:       info-pascal@brl.mil
>
>  int2str should be changed to str()
>  str2int should be changed to val()
>  Caution: The parameters are differents and Str() and val() are
> PROCEDURES whereas int2str() and str2int() are functions.
 
 I normally use these sub-programs and avoid raw STR or VAL
 in code. Perhaps you may profit from them:
 
 FUNCTION IntStr (lng :LONGINT) :STRING;
 (* LONGINT -> STRING,
 minimal integer representation. *)
 VAR
   s :STRING;
   i :INTEGER;
 BEGIN
   SYSTEM.STR(lng:0,s);
   IntStr := s;
 END;
 
 FUNCTION IntVal (s :STRING; VAR lng :LONGINT) :BOOLEAN;
 (* STRING -> LONGINT,
 returns TRUE if integer numeric conversion succeed *)
 VAR i :INTEGER;
 BEGIN
   SYSTEM.VAL(s,lng,i);
   IntVal := i = 0;
 END;
 
-- Josep Sau: zccbjsb@eb0ub012.bitnet
-- Library application programmer, Universitat de Barcelona.
-- Enjoying TP/DOS. Using PLI/VM, REXX/VM. Suffering NATURAL/ADABAS.
From: 75230.1437@CompuServe.COM (I.I.S.)
Newsgroups: comp.lang.pascal
Subject: URGENT HELP NEEDED ON RESOURCE WORKSHOP (TPW 1.5)
Date: 26 Jan 1993 22:14:36 -0600
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

A very weird problem: my TPW 1.5 application will run only if the
Resource Workshop is running. If not, whenever I start the application,
I get an error: "error code = -1". 

Even more puzzling, if the application is running, and I go to the
resource editor and close it, the same error message pops up and the
system is dead.

In my application, only one resource file "xxxx.RES" is included with
{$R xxxx.RES"}. It doesn't need any other support file. In fact, I ran
it (with only the .EXE file on the floppy) on another computer, it
shows the same symptom.

This application is scheduled to be shipped out on Friday. Any help will
be greatly appreciated.
From: bart@netcom.com (Harry Bartholomew)
Newsgroups: comp.lang.pascal
Subject: help
Date: 23 Jan 93 11:08:00 GMT

help

Newsgroups: comp.lang.pascal
From: pek@logos.res.utc.com (Paul Kirschner)
Subject: Can you overlay graphics without obscuring the lower ones?
Organization: United Technologies Research Center
X-Newsreader: TIN [version 1.1 PL8]
Date: Thu, 21 Jan 1993 14:42:29 GMT

Is there a way to overlay graphic figures (circles, rectangles, etc.)
so that the underlying figure "bleeds through" the top one?

I want to make a "business presentation" type bar chart where
succeeding years are overlaid.  However, the top bar totally obscures
the one behind it - even with a stripped pattern.  I want to use a
stripped pattern so that the lower one shows through.

I can make the same effect "by hand" by drawing the top rectangle
directly and stripping it line by line.  Unfortunately this is
resolution dependent for the line spacing.  It would be MUCH easier to
use the built-in fill patterns and have the BGI do the work!

Anyone solved this?

--
------------------------------------------------------------------------------
Paul Kirschner                                       #include <disclaimer.std>
pek@logos.res.utc.com
United Technologies Research Center
Newsgroups: comp.lang.pascal