HDTenEightyP/NetNews huggingface dataset:
From: etljmme@etlxd30.ericsson.se (Jim)
Newsgroups: comp.lang.pascal
Subject: Re: There is no decompile on Turbo is ther
Date: 7 Jan 93 11:11:50 GMT
Reply-To: etljmme@etlxd30.ericsson.se
Organization: Ericsson

In article <1ifihbINNe4e@usenet.INS.CWRU.Edu> ah157@cleveland.Freenet.Edu (Rob Henry) writes:
>I can't take a trubo pascal compiled program and reverse it to get
>the source code can I?


There's something in a similar vein floating around the C groups too.
Technically yes, it's possible to do.  In fact there's a C program called
Sourcerer which translates binary to asm and then attempts to translate
clumps of associated asm into corresponding C.  It, and other similar
programs, just don't work.

1.  The "source" generated is very inaccurate and is usually just plain
    wrong.  Not to mention back-translating pointers, variables etc.

2.  It's just too much hassle!  Don't forget, to dissassemble to source
    code you have to undo all sorts of compiler optimizations (like
    loop unfolding, for example).

The only thing you could reliably re-create are things like clrscr and halt()
because they tend to be obvious and unaltered at the asm level.  So in theory
it's possible but I wouldn't waste your time trying to do it!

Cheerio,
Jim.
Newsgroups: comp.lang.pascal
From: jzawodn@andy.bgsu.edu (jeremy zawodny)
Subject: Re: Looking for books for windows programming
Organization: Bowling Green State Univ.
Date: Sun, 10 Jan 1993 02:27:57 GMT

In article <Jcw5wB4w165w@tcscs.UUCP> zeta%tcscs@src.honeywell.com writes:
>I'd like to find a pascal programming book for programming windows apps.
>
>I have bp7 and would like to use it to its fullest abilities.  Thanks
>

What about that shitload of manuals and reference books at BP 7.0 comes with?


-- 
Jeremy Zawodny, Computer Nerd (student) @ Bowling Green State University

jzawodn@andy.bgsu.edu
From: gtd543a@prism.gatech.EDU (death)
Newsgroups: comp.lang.pascal
Subject: Re: File locking question
Date: 6 Jan 93 23:00:04 GMT
Organization: Purgatory
X-Newsreader: Tin 1.1 PL5

Hendrik Klompmaker (Hendrik.Klompmaker@beheer.zod.wau.nl) wrote:
: In article <1993Jan5.220346.24647@csx.cciw.ca> u055@csx.cciw.ca (James Sprenger) writes:
: 
: >
: >>
: >> So my guess  is that your program username should:
: >>
: >>  -be compiled with $I-  (no stop on runtime error)
: >>
: >>  -Repeat
: >>     -try to open the file in mode $11 (Write and deny ALL)
: >>  -Until (IoResult=0)  (* nobody else has locked it *)
: >>
: >
: >
: Indeed it does not work. I came up with the following working solution. I 
: did not find a way to chech if a file was locked useing ioresult or doserror 
: while reset(ing) or append(ing) a file. It does however get set if do the 
: following
: {$i-}
: repeat
:   setattr(logf,$20); {Archive bit set}
: until doserror = 0;

All of these methods are -bad-, B-A-D bad.  In network management you
meet up with something called deadlock.  It occurs when one program
wants file X, and already has open file Y, and when a second program
wants file Y, and already has open file X.  Neither will be satisfied
until the other releases a file wanted by the other.  If you create
an infinite "repeat until unlocked" loop you foolishly run the risk
of deadlock, which both eats a lot of resources (repeated requests
through the network) and locks further progress.  Always make a 
timeout or some other default (like max number of retries) failsafe
into whatever low level locking scheme you use.: 
-- 
=========================================================================
WANTED:  Position for experienced Matrix runner.  Demanding and ambitious
positions welcome.  Must have support for a FUCHI XNN1-11-22 cyberdeck.
=========================================================================
Newsgroups: comp.lang.pascal
From: chard@borland.com (Richard Nelson)
Subject: Re: Syntax highlighting misses
Originator: chard@genghis.borland.com
Organization: Borland International
Date: Wed, 13 Jan 1993 00:03:53 GMT

>The syntax highlighting available in the BP7 editor is fine
>as far as it goes. But why are the tokens REAL, INTEGER, WORD, CHAR,
>DOUBLE, etc. NOT highlighted as reserved words (or anything else)
>when STRING makes it?

We just discussed this in another thread, but hey...repetition for
emphasis....

The word "string" has two possible meanings in Turbo/Borland Pascal.
It can be used as a standard type, and also as a reserved word.
Because the syntax highlighter can't determine which use it's looking
at, it always highlights string, because it is reserved; i.e., you
can't redefine it.

The other types you mention are not reserved.  You can define a
variable called Real, for example.
-- 
=========================================================================
 Richard Nelson, Borland Int'l | chard@borland.com | Go Bears! Grrr-rah!
  Had this been Borland's opinion, I would have written it in a manual.
 "...there's no hurry, I'm just sittin' here doing time." - John Lennon
Newsgroups: comp.lang.pascal
From: hennesse@chemdept.chem.ncsu.edu (Glenn Hennesse)
Subject: Re: Something with the memory
Organization: Chemistry Department, North Carolina State University
Date: Mon, 4 Jan 1993 13:39:36 GMT

In article <4JAN93.05103290@meena.cc.uregina.ca> armbrusj@meena.cc.uregina.ca writes:
>From: armbrusj@meena.cc.uregina.ca
>Subject: Something with the memory
>Date: 4 JAN 93 05:10:32 GMT
>    I was wondering if someone out there could help me with a little problem.
>I'm using a very old version of Turbo Pascal (3.0) and am having trouble with
>a text manipulation program I made.  I made this program to read in parts of a
>text file, and produce some output to the screen.  Everything works good the
>first run, just like it should.  But say I change something and re-compile it
>or exit, run a different program, then come and run that one again, I get
>screwed output!  It puts in control characters and other crap that is not
>suppose to be there.  I think it has something to do with the memory because
>everytime I startup the computer and run the program I made before any other,
>it works fine.  But as soon as something else is in the memory, bam!  It goes
>screwy.  Any suggestions?  It's really starting to get on my nerves.  And it's
>not any TSR's, cause I removed them and it did the same thing!  Is there some
>way to clear the memory as you run the program?  Any help would be muchly
>appreciated!  Thanx.
>
>Jason

You probably have an uninitialized variable.  I have had this happen to me 
and that has turned out to be the problem every time.  Check all variables 
and make sure that they are being given some value (like 0 for numbers and 
blank for strings).
Glenn
Glenn Hennessee
Box 8204
Department of Chemistry
North Carolina State University              "It's hard to work in a group
(919) 515-2947                                when you're omnipotent." --Q 
Glenn_Hennessee@ncsu.edu
Newsgroups: comp.lang.pascal
From: reagan@hiyall.enet.dec.com (John R. Reagan)
Subject: Re: complex numbers
Organization: Digital Equipment Corporation
Date: Tue, 5 Jan 1993 22:06:49 GMT


In article <34876@adm.brl.mil>, OLDENHUIS@ib.agro.nl (Roelof Oldenhuis) writes...
>I know TP has no standard procedures or functions for complex analysis 
>problems (Fortran does), but are there units or sets of functions/procedures 
>available to do this kind of mathematics?
> 
Well, the Extended Pascal standard has complex numbers.  Just get Borland
to implement that part of the standard.

---
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.
---
From: berend@contrast.wlink.nl (Berend de Boer)
Newsgroups: comp.lang.pascal
Subject: tvquestion
Date: Tue, 05 Jan 1993 09:54:42

 AN> Hi,
 AN>    my name Mark Nowinski I was wondering how I can put my
 AN> program into Turbo Vision. (Program listed below)

 AN> Program Convert;
 AN> Uses CRT;
 AN> const
 AN>     intercept = 32.0;
 AN>     slope = 1.8;
 AN> Var
 AN>   fahrenheit, celsius : real;
 AN> begin
 AN> ClrScr;
 AN>      write('Enter the degrees in Celsius: ');
 AN>      readln(celsius);
 AN>      fahrenheit := intercept + celsius * slope;
 AN>      writeln('That is equal to ',fahrenheit:3:0,' degrees
 AN> F'); repeat until keypressed;
 AN> ClrScr;
 AN> end.

program Demo;
uses Objects, Views, Dialogs, App;
const
  intercept = 32.0;
  slope = 1.8;
var
  MyApp : TApplication;
  Dialog : PDialog;
  R : TRect;
  s : string;
  P : PView;
  fahrenheit, celsius : real;
  code : word;
  Result : word;
begin
  MyApp.Init;
  R.Assign(20,6, 58,16);
  Dialog := New(PDialog, Init(R, 'Celsius'));
  with Dialog^ do  begin
    R.Assign(2,2, 30,3);
    Insert(New(PStaticText, Init(R, 'Enter the degrees in Celsius')));
    R.Assign(2,3, 19,4);
    P := New(PInputLine, Init(R, 15));
    Insert(P);
    R.Assign(14,7, 24,9);
    P := New(PButton, Init(R, 'O~K~', cmOK, bfDefault));
    Insert(P);
    SelectNext(FALSE);
  end;  { of with }
  Result := MyApp.ExecView(Dialog);
  Dialog^.GetData(s);
  Val(s, celsius, code);
  fahrenheit := intercept + celsius * slope;
  Val(fahrenheit:3:0, s);
  R.Assign(20,6, 58,16);
  Dialog := New(PDialog, Init(R, 'Fahrenheit'));
  with Dialog^ do  begin
    R.Assign(2,2, 30,3);
    Insert(New(PStaticText, Init(R, 'That is equal to ' + s + ' degrees
F')));
    R.Assign(14,7, 24,9);
    P := New(PButton, Init(R, 'O~K~', cmOK, bfDefault));
    Insert(P);
  end;  { of with }
  Result := MyApp.ExecView(Dialog);
  MyApp.Done;
end.


 AN> I would appreciate if someone wrote a short demo program.

Maybe this can help you. I do not know if it works, it is entered by
head but it should give you at least an idea.


Groetjes,

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

Newsgroups: comp.lang.pascal
From: leonard@qiclab.scn.rain.com (Leonard Erickson)
Subject: Re: File locking question
Reply-To: Leonard.Erickson@f51.n105.z1.fidonet.org
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
Date: Tue, 12 Jan 1993 06:37:00 GMT

Hendrik.Klompmaker@beheer.zod.wau.nl (Hendrik Klompmaker) writes:

>which writes the username, time and date to the log file.
>A problem arrises when 2 people log in at the same time. Right: the log file 
>is locked by one of them and the other one gets a A-R-I error (abort,re...)
>Is there a simple (and fast and small) method to detect if a file is locked 
>or not. (since username is a TP program it would sure be possible to do the 
>checking there (how ??) but maybe it would even be possible to do that at 
>dos/batch level. 
>Any hints ??

I had to handle this too. I handled it something like this:

FileMode := $12; {Deny Access to others, read/write mode}
ctr := 0;
repeat
  {$I-}
  append(logfile);
  {$I+}
  inc(ctr);
until (IOResult = 0) or (ctr>limit);
if ctr > limit then {error routine}

This waits for the file to be free *or* until a retry limit is reached.
On our heavily used LAN, it was quite possible to have unacceptable
times to get access. Especially if some *idiot* used a file browser
to look at the logfile! (Which did happen because it needs to be world
writeable *and* word readable for appending to work right.)


-- 
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: lee@cpu.us.dynix.com (Lee Crites)
Newsgroups: comp.lang.pascal
Subject: Re: Changing from hidden to UNHIDDEN
Date: 12 Jan 93 17:38:44 GMT

On 11 Jan 1993, Craig_J_Stadler wrote:
> How does one go about changing a file attribute
> from hidden to unhidden using SetFAttr ?

Try these two procedures on for size:

GetFAttr(FName:String;Var RdOnly,Hid,Sys,Arch:Boolean);
Var R:Registers;
Begin
  FillChar(R,SizeOf(R),0);
  FName := FName+#0; { set up as a null-terminated string for DOS }
  With R Do Begin
    AH := $43;
    DS := Seg(FName); DX := Ofs(FName)+1; { skip pascal length byte }
    MsDos(R);
    RdOnly := (CL And $01) > 0;
    Hid := (CL And $02) > 0;
    Sys := (CL And $04) > 0;
    Arch := (CL And $20) > 0;
    End; { with }
End; { GetFAttr }

PutFAttr(FName:String;RdOnly,Hid,Sys,Arch:Boolean);
Var R:Registers;
Begin
  FillChar(R,SizeOf(R),0);
  FName := FName+#0; { set up as a null-terminated string for DOS }
  With R Do Begin
    AH := $43; AL := 1;
    DS := Seg(FName); DX := Ofs(FName)+1; { skip pascal length byte }
    If RdOnly Then CL := CL Or $01;
    If Hid Then CL := CL Or $02;
    If Sys Then CL := CL Or $04;
    If Arch Then CL := CL Or $20;
    MsDos(R);
    End; { with }
End; { PutFAttr }

The file FName does NOT have to be opened for this to work.  In fact, it
would probably be better if it were not.

Hope this helps.

           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
            lee@us.dynix.com | If it ain't broke yet,
                             |   let me have a shot at it....
           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Newsgroups: comp.lang.pascal
From: dave@tygra.Michigan.COM (David Conrad)
Subject: Re: detecting printer on
Organization: CAT-TALK Conferencing System
Date: Tue, 5 Jan 1993 10:44:03 GMT

In article <93003.235043U35284@uicvm.uic.edu> U35284@uicvm.uic.edu writes:
>Ok I know this is definately FAQ material but I've been watching this group
>for a couple of days and havent seen a listing and I'm in a jam for some
>quick and dirty code.
>I need some Turbo Pascal code to detect whether a given printer is ready or
>not. Actually LPT1 will suffice.

Look at DosTools.pas in /pc/turbopas/drcpas10.zip which you can ftp from
garbo.uwasa.fi; it has code to do just that.

David R. Conrad
-- 
=  CAT-TALK Conferencing Network, Computer Conferencing and File Archive      =
-  1-313-882-2209, 300bps-14400bps, V.32/V.32bis/TurboPEP New users use 'new' - 
=  as a login id.  AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET")            =
   E-MAIL Address: dave@Michigan.COM
Newsgroups: comp.lang.pascal
From: dave@tygra.Michigan.COM (David Conrad)
Subject: Re: CRC values in Turbo PASCAL
Organization: CAT-TALK Conferencing System
Date: Fri, 8 Jan 1993 12:05:10 GMT

In article <1993Jan6.202931.6292@cs.unca.edu> snodgras@cs.unca.edu (Ryan Snodgrass) writes:
>Does anyone know how to calculate CRC values of a file in Turbo Pascal?

You can get /pc/turbopas/drcpas10.zip from garbo.uwasa.fi by anonymous ftp.
I've got a unit in there which calculates 32-bit CRC's.

David R. Conrad
-- 
=  CAT-TALK Conferencing Network, Computer Conferencing and File Archive      =
-  1-313-882-2209, 300bps-14400bps, V.32/V.32bis/TurboPEP New users use 'new' - 
=  as a login id.  AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET")            =
   E-MAIL Address: dave@Michigan.COM
From: ts@uwasa.fi (Timo Salmi)
Newsgroups: comp.lang.pascal
Subject: Re: TSR Problem
Date: 6 Jan 93 11:32:49 GMT
Organization: University of Vaasa, Finland

In article <1993Jan6.105050.5402@ericsson.se> etljmme@etlxd30.ericsson.se (Jim) writes:
>Maybe Timo has some TSR code in his garbo FTP archives?

I cannot say off hand.  But one trick besides the ordinary file list
/pc/INDEX.ZIP is to look at
  30963 Jan 6 12:39 garbo.uwasa.fi:/pc/turbopas/0turbopa.zip

It gives the file contents of every .zip package of our /pc/turbopas
directory.

I am afraid that this is the best I can do on this one.

   All the best, Timo

..................................................................
Prof. Timo Salmi      Co-moderator of comp.archives.msdos.announce
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
From: pigeons@JSP.UMontreal.CA (Pigeon Steven)
Newsgroups: comp.lang.pascal
Subject: Re: untyped vars
Date: 9 Jan 93 16:36:13 GMT
Organization: Universite de Montreal

In article <34921@adm.brl.mil> ATURNER@rcnvms.rcn.mass.edu (Alan Turner) writes:
>Date sent:  1/7/93
>
>Hello to all,
>
>I am curious - TP allows for untyped vars as in parameter lists:
>
>ex:   procedure something(a : word; b: byte; var c)
>                                             ^^^^^
>I would like to know of some wonderful uses for such a thing in addition
>to comparing the size of two variables as in TP60.man pg 107-108.
>
>
>
>-=Alan Turner=-                
>-=Email: aturner@ecn.mass.edu=-


One "wonderful use" for untyped variables is precisely when you dont quite
care for types. Exactly as "blockread" and "blockwrite", on which you can
read in the manual, or to program routines that are non "type-oriented" but
only "size" or "byte-packet" oriented. I wrote some time ago a unit for
string management (in replacement of the system routines, copy, insert,
delete, etc) giving a respectable improvement (sp?) of 6 to 10 times faster,
(sorry, that's not the point) and all strings are refered as "var a;", with
no type, thus avoiding the fallowing bug:


type shortstring= string[40];  { say}

...

var a:shortstring;
    ...
begin
 ...
 delete(a,1,10);
 ...
end;
...

And getting an "type mismatch" when strict var/type option is on. You can find
another half-a-dozen "wonderful uses" for untyped variable.

	Regards,

		S.

-- 
------------------------------------------------------------
 STEVEN PIGEON, a.k.a pigeons@jsp.umontral.ca, planet Earth.
==Departement d'informatique et de Recherche Operationnelle=
              == Universite de Montreal==
From: lee@cpu.us.dynix.com (Lee Crites)
Newsgroups: comp.lang.pascal
Subject: Re: Borland / Turbo Pascal 7.0
Date: 12 Jan 93 16:46:01 GMT


> 
> So, I pose to you the big question. Comparing the benefits to the
> COST (which I hear is pretty outrageous if you want something
> decent), is it worth it for me to upgrade? Seeing that a lot of
> people here use BP7 and TP7 makes me think that this is the best
> place to ask. Thanks a lot!
> 
>  - Ron Isaacson

Ron, and others --

I own a company that produces customized software for several vertical
markets, and some generalized office automation packages thrown in to keep
life interesting.  We have upgraded to BP7.  Although there are some
things that we have found that are not what we expected, we are still
quite happy wit the new version.  It is, however, still quite too early to
give you a cost/benefit analysis.  I have dedicated the next few weeks to
upgrading all of our existing libraries and objects to the BP7 format (a
project that WE can perform, since WE only use libraries and objects that
either WE have developed, or have the source code for -- this is NOT the
first time that this bug-a-boo has hit us in the last fifteen years).

Why are we doing this?  Two reasons leap to mind.  First, if BP7 is not
compatible with TP6, then nothing later will be either (BP8?, BP15.3?). 
If we are going to stay up with, or ahead of, our competitors, then we
have to keep up with the technology.  And, believe it or not, I really
think that BP7 has enough improvements to justify the time we are taking
to upgrade.

Second, there is finally a move towards compatibility between DOS and
WINDOWS development.  It is not as much as I would have liked, but at
least I can see some good movement there.  I had totally given up on using
TPW1.5, and, in fact, had totally removed it from my machines.  There were
too many differences for the three of us to keep up with.  Hopefully, we
will not have that problem with BP7.  At lease Borland seems to have taken
some steps towards solving that.

Your condition is probably different.  I have had to suffer with the pains
of trying to get upgraded libraries from vendors for years before we
decided to bite the bullet and create the functions ourselves.  Some of
them are still being worked on (see my previous message asking for help on
n-way tree structures).  It seemed cost effective for me.  It might be the
worst move you could make.

Clear as mud?

           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
            lee@us.dynix.com | If it ain't broke yet,
                             |   let me have a shot at it....
           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Newsgroups: comp.lang.pascal
From:  Konstantin ?. Mohorea <kim@virt.moldova.su>
Subject: Re: Re: Sprites in TP 6.0 ::: How really can I get them
Date: Fri, 8 Jan 1993 18:22:20 GMT
Reply-To: kim@virt.moldova.su
Organization: add
Summary: Need help in getting archives with sprites

> HI!!!!!!!!!!!!!! TRY ANONYMOUS FTP TO
>                  WUARCHIVE.WUSTL.EDU in subdirectory
>            SYSTEMS/MSDOS/SIMTEL20/TURBOPAS
> lookfor :
> 1) ANIVGA11.zip (COOOOOOOOOOOOOOOOOOOOOOOOOOLLL!!)
> 2) GAMETP20.zip
>
> ENJOY!..i am working with ANivga (ease of use!:)!!)
>        so i can't say much about 2)

I'm interested in making sprites on Turbo Pascal and read this message.
What does it means  ...in subdirectory SYSTEMS/MSDOS...?
And how can I access these files ??? Help me please because I'm novice
in E-mailing.
Thanks in any case.


Newsgroups: comp.lang.pascal
From: frep@cs.UAlberta.CA (Geoff Baskwill)
Subject: Program cores on redirection
Organization: University of Alberta, Edmonton, Canada
Date: Tue, 12 Jan 1993 20:22:25 GMT

I am having a problem with a Pascal program I have written, obviously, and I was 
wondering if anybody has any ideas as to why it should die in this particular manner:

Whenever I try to redirect the input with < or >, for some reason it core dumps on
me with a seg fault message.  If I pipe to the program, like "cat bob.txt | prog" it
won't die, but if I go "cat bob.txt | prog > results" -- ACK!  It dies.  I'm using
standard readln and writeln, what's going on?

Any ideas?

Geoff.
Organization: Penn State University
Date: Tue, 5 Jan 1993 01:58:17 EST
From: <JXU3@psuvm.psu.edu>
Newsgroups: comp.lang.pascal
Subject:    Passing functions as params in Turbo Pascal

While ISO Standard Pascal (as defined by Jensen and Wirth) allows
passing functions as parameters to other functions or procedures,
Turbo Pascal 6.0 that I use at school, declares an error that an
identifier is expected, which means that I cannot pass functions
as parameters in the standard way.  For all you TP experts on the
net, is there a workaround? e.g. something like defining pointers
to functions as one might do in C?  Thanks in advance for any help
in this matter. I desperately need this feature, so that I don't
have to write a separate integration procedure for every function
I want to integrate.

Atul Ramani
PSUVM
===========
Newsgroups: comp.lang.pascal