[comp.lang.pascal] Turbo Pascal

BITNET@wiscvm.wisc.EDU> (09/28/87)

Hi out there!
      I'm trying to do some work with Borland's Turbo Pascal
on my Macintosh computer.  The manual supplied with the compiler seems to
be a good reference, but little more.  Is the Turbo Pascal tutor (also
available from Borland) worth getting?  One more thing, will programs
written in MacPascal run with Turbo?  I don't mean without some modification
but is it possible to transfer program at least to some degree?
thanx for any help
                       Mike R

larson@sri-unix.UUCP (10/01/87)

In article <9522@brl-adm.ARPA> BITNET@wiscvm.wisc.EDU> writes:

>  One more thing, will programs
>written in MacPascal run with Turbo?  I don't mean without some modification
>but is it possible to transfer program at least to some degree?

Lightspeed Pascal (apparently written by the same people as MacPascal)
is VERY similar to MacPascal.  The manual was an excellent reference
book, on the language and the system calls supported (almost, if not all).

Are there any other MacPascal/Lightspeed Pascal folks here?  Anyone to listen
to my screams when they implement the stupid parts of the Pascal standard?

	Alan

arunc@uxe.cso.uiuc.edu (07/13/88)

I am writing a program in Turbo Pascal 4.0 to drill musicians
in their recognition of sequences of intervals.  TP4 has a 
built-in Sound(Frequency) function, where "Frequency" is an integer
value.

However, I need frequencies which are real-number values.  (For example,
middle C (C4) is 261.6 Hz.)   I have completed writing the program using
only integers, but the resulting pitch-intervals are, understandably,
"out of tune".

How can frequencies be gotten out of the speaker that are real-number
values?  Can this be done using Turbo Pascal?  Are there other languages
which allow for this degree of control?

Thanks for any help,

	Arun Chandra
	arunc@uiucuxc.CSO.UIUC.EDU

jduarte@BONNIE.ICS.UCI.EDU (09/01/89)

Hi,

jduarte@BONNIE.ICS.UCI.EDU (09/01/89)

$$##!!

umrose05@ccu.umanitoba.ca (Dave Rose) (01/06/90)

I currently own a copy of Turbo Pascal, and it works great, although
I am getting programs that are requiring that there be some
"tool box" files to be included in the compilations.
 
Are these generic files that come with TP or am I missing something?
 
Dave

-- 

Dave Rose                 :          Email - Umrose05@ccu.UManitoba.CA
10 Covent Rd.             : Local (Amdahl) - #Rose05@ccm.UManitoba.CA
Winnipeg, Manitoba, Canada:

leonard@bucket.UUCP (Leonard Erickson) (01/08/90)

umrose05@ccu.umanitoba.ca (Dave Rose) writes:

>I currently own a copy of Turbo Pascal, and it works great, although
>I am getting programs that are requiring that there be some
>"tool box" files to be included in the compilations.
> 
>Are these generic files that come with TP or am I missing something?

The various Toolboxes are *seperate* packages of routines. Borland
sell, a Database Toolbox, a Graphix Toolbox, an Editor Toolbox, and
a Numerical Methods Toolbox. These are units or groups of unit for 
various purposes. 

If the program wants the Editor Toolbox routines, then you will have
to either buy that Toolbox, or rewrite the program to do without it.
-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I'm all in favor of keeping dangerous weapons out of the hands of fools.
Let's start with typewriters." -- Solomon Short

granoff@vaxwrk.enet.dec.com (Mark H. Granoff) (01/11/90)

> The various Toolboxes are *seperate* packages of routines. Borland
> sell, a Database Toolbox, a Graphix Toolbox, an Editor Toolbox, and
> a Numerical Methods Toolbox. These are units or groups of unit for 
> various purposes. 

There's also a Gameworks Toolbox.

BTW, Turbo Tutor is also considered one of the additional packages in
this class, but it's not for writing your own tutorial packages.  It's a
TURBO Pascal tutorial, so I think its just a program with support files.

----------------------------------------------------------------------
Mark H. Granoff               | Software Services/Engineering VAXworks
Digital Equipment Corporation | ARPAnet: granoff@vaxwrk.dec.com
129 Parker Street             | EASYnet: VAXWRK::GRANOFF
PKO2-1/M21                    | Usenet : ...!decwrl!vaxwrk!granoff
Maynard, MA 01754             | AT&T   : (508) 493-4512
----------------------------------------------------------------------
Disclaimer: Views expressed herein are my own and do not necessarily
            reflect those of my employer.
----------------------------------------------------------------------

umrose05@ccu.umanitoba.ca (Dave Rose) (01/13/90)

In article <1903@bucket.UUCP> leonard@bucket.UUCP (Leonard Erickson) writes:
>
>The various Toolboxes are *seperate* packages of routines. Borland
>sell, a Database Toolbox, a Graphix Toolbox, an Editor Toolbox, and
>a Numerical Methods Toolbox. These are units or groups of unit for 
>various purposes. 
>
>If the program wants the Editor Toolbox routines, then you will have
>to either buy that Toolbox, or rewrite the program to do without it.


How would I find out what tool box the program needs?

-- 

Dave Rose                 :          Email - Umrose05@ccu.UManitoba.CA
10 Covent Rd.             : Local (Amdahl) - #Rose05@ccm.UManitoba.CA
Winnipeg, Manitoba, Canada:

umrose05@ccu.umanitoba.ca (Dave Rose) (01/15/90)

In article <7385@shlump.nac.dec.com> granoff@vaxwrk.enet.dec.com (Mark H. Granoff) writes:
>
>There's also a Gameworks Toolbox.
>
>BTW, Turbo Tutor is also considered one of the additional packages in
>this class, but it's not for writing your own tutorial packages.  It's a
>TURBO Pascal tutorial, so I think its just a program with support files.
>

How do I know what package I need in order to compile these programs?


-- 

Dave Rose                 :          Email - Umrose05@ccu.UManitoba.CA
10 Covent Rd.             : Local (Amdahl) - #Rose05@ccm.UManitoba.CA
Winnipeg, Manitoba, Canada:

rcerami@chaucer.uucp (24383-richard cerami(B354)m000) (02/15/91)

I am currently using Turbo Pascal 5.5 and have several questions
about it.

 1.  If I compile a program that USES a unit, will the unused procedures
     of that unit be included in the output (.exe)?

 2.  There is a limit to the size/amount of code you can edit
     using the Turbo editor.  What is the limit?  Can it be increased?
     
Thanks (in advance)

Rich.



    

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) (02/15/91)

In article <1991Feb14.190219.29734@porthos.cc.bellcore.com> rcerami@chaucer.uucp (24383-richard cerami(B354)m000) writes:
>
>I am currently using Turbo Pascal 5.5 and have several questions
>about it.
>
> 1.  If I compile a program that USES a unit, will the unused procedures
>     of that unit be included in the output (.exe)?

Generally no, but there are exceptions.  If any of the procedures you use
uses another procedure, then the other one will come in too.  Same thing if
the unit initialization code uses code in the unit.  Also, if a procedure 
that's referenced is coming from an external .OBJ file, the whole code from the 
.OBJ comes in.  Finally, virtual methods come in if you use any instances of
the object type, and make references to the same method in other related
objects.
>
> 2.  There is a limit to the size/amount of code you can edit
>     using the Turbo editor.  What is the limit?  Can it be increased?

It's probably 64K per file, and probably not.  You can get around it by
splitting your file into units.  Eventually (sooner than you'd think!) you'll
hit compiler limits if you try to compile in the IDE; you can do bigger
compiles with TPC.

Duncan Murdoch

John G. Spragge <SPRAGGEJ@QUCDN.QueensU.CA> (02/15/91)

In article <1991Feb14.190219.29734@porthos.cc.bellcore.com>,
rcerami@chaucer.uucp (24383-richard cerami(B354)m000) says:
>
>I am currently using Turbo Pascal 5.5 and have several questions
>about it.
>
> 1.  If I compile a program that USES a unit, will the unused procedures
>     of that unit be included in the output (.exe)?

No. Turbo Pascal's "smart linker" excludes unused identifiers.

> 2.  There is a limit to the size/amount of code you can edit
>     using the Turbo editor.  What is the limit?  Can it be increased?

65535 characters (64 kilobytes). You can't increase the size, but you
can break your code up into smaller units (recommended), or you can
use the include {$I filename } facility to break a single unit up
into several source files.

disclaimer: Queen's University supplies me with computer services, not
            my opinions.

John G. Spragge

aindiana@osiris.cso.uiuc.edu (Daiv Stoner) (02/15/91)

I tried email, but it bounced, so here are your answers:


>I am currently using Turbo Pascal 5.5 and have several questions
>about it.

> 1.  If I compile a program that USES a unit, will the unused procedures
>     of that unit be included in the output (.exe)?

No.  The built-in linker "automatically removes unused code and data when
building an .EXE file."  Check out pages 220-221 of the TP Reference Guide.
If it's not on those pages, try the index under "Smart linking" or 
"Linking, smart."
Note:  The smart linker is disabled when you compile to memory.

> 2.  There is a limit to the size/amount of code you can edit
>     using the Turbo editor.  What is the limit?  Can it be increased?
The TP User's Guide says you can edit code up to 64K.  (page 239, 
Appendix B: Using the Editor)  Doesn't mention whether it can be
increased.
>     
>Thanks (in advance)
No problem.  And, by the way, I'm not trying to be nasty by giving you
the page numbers in the manuals.  Just thought you might want to look
the stuff up to get more info.

>Rich.

--
Daiv Stoner
aindiana@osiris.cso.uiuc.edu
daiv@coplex.UUCP

ts@uwasa.fi (Timo Salmi) (02/16/91)

In article <1991Feb14.190219.29734@porthos.cc.bellcore.com> rcerami@chaucer.uucp (24383-richard cerami(B354)m000) writes:
>
>I am currently using Turbo Pascal 5.5 and have several questions
>about it.
>
> 1.  If I compile a program that USES a unit, will the unused procedures
>     of that unit be included in the output (.exe)?

No, the code is optimized in that respect.

> 2.  There is a limit to the size/amount of code you can edit
>     using the Turbo editor.  What is the limit?  Can it be increased?

64K.  No, use another editor and then tpc.  But better to apply
units. 

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

dhosek@freke.claremont.edu (Don Hosek) (02/17/91)

In article <1991Feb15.174112.15917@uwasa.fi>, ts@uwasa.fi (Timo Salmi) writes:
> In article <1991Feb14.190219.29734@porthos.cc.bellcore.com> rcerami@chaucer.uucp (24383-richard cerami(B354)m000) writes:
 
>> 2.  There is a limit to the size/amount of code you can edit
>>     using the Turbo editor.  What is the limit?  Can it be increased?
 
> 64K.  No, use another editor and then tpc.  But better to apply
> units. 

As an addendum to this discussion, TP 6.0's IDE can handle files
up to 1M. Very handy since I tend to work with huge files (e.g.,
LaTeX.TeX and TeX.WEB although I haven't tried dealing with the
latter in the PC environment yet).

To change the discussion direction slightly, I've heard a lot of
people muttering about 6.0 being in some ways a step down from
5.5. Since I just came into the PC world and bought 6.0 because
it was on the shelves at Egghead, I'd be curious to hear in what
ways this is so.

-dh

---
Don Hosek   To retrieve files from ymir via the    | dhosek@ymir.claremont.edu
            mailserver, send a message to          | Quixote TeX Consulting
            mailserv@ymir.claremont.edu with a     | 714-625-0147
            line saying send [DIRECTORY]FILENAME 
            where DIRECTORY is the FTP directory (sans "anonymous") and 
            FILENAME is the filename, e.g. "send [tex]00readme.txt". There is
            a list of files in each directory under the name 00files.txt
            Binary files are not available by this technique.

einstein@cs.mcgill.ca (Michael CHOWET) (02/18/91)

In article <1991Feb14.190219.29734@porthos.cc.bellcore.com> you write:

> 1.  If I compile a program that USES a unit, will the unused procedures
>     of that unit be included in the output (.exe)?

  Borland hypes the fact that the answer to this is no.... As well, if one
USES two units, each of which USES a third unit, the third unit is included
only once...

> 2.  There is a limit to the size/amount of code you can edit
>     using the Turbo editor.  What is the limit?  Can it be increased?

  Well, I hit the limit a while back (before I got into Units). As far as I 
know, and as far as the editor told me, it's 64K. If you get anywhere near
the limit, the editor will warn you. A reversed area appears with the amount 
of memory in bytes you still have and it beeps every time you hit a <CR>...
-- 
_______________________________________________________________________________
|        McGill University, Montreal, Canada          | "You and what army?"  |
|Computer Science Undergraduate Society - VP External |      -Saddam Hussein  |
|____ Michael Chowet  I-Net: einstein@cs.mcgill.ca ___|_______________-cc_____|

herring@evax.arl.utexas.edu (Erick Herring) (02/19/91)

dhosek@freke.claremont.edu (Don Hosek) writes:

>To change the discussion direction slightly, I've heard a lot of
>people muttering about 6.0 being in some ways a step down from
>5.5. Since I just came into the PC world and bought 6.0 because
>it was on the shelves at Egghead, I'd be curious to hear in what
>ways this is so.
>
>-dh

Many people seem to be slamming TP 6.0 because of the new environment.
I have been using Turbo Pascal for a while now (since 3.x) and I have
nothing but praise for the new environment, the code it generates, and
the responsiveness of the product when taken as a whole.

Recently, I had to do a quick turnaround on a fairly complex project,
and I let good programming methodology fall by the wayside - yes, I
went into hacker mode :-)  If I had not been able to have an output
window on the screen alongside three editor windows, an error window,
and a watch window, I never would have made it.

I would like for the people who claim bad code generation, etc. to
post or mail the offending code.  I have compiled copies of past
projects with 6.0, 5.5, and 5.0, and then checked them  with the
profiler.  Turbo Pascal 6.0 has never been worse than 5.0 or 5.5.

Final note:  I have an 80386-25 MHz (4MB), which may be why I don't
have space/speed problems.  If that is the case, well, I'm sorry.
Just because a product is slow on an 8088 or an 80286 doesn't mean it
is a dog.  If we want cool new toys...er...tools, then we have to
expect these tools to get bigger and more complex.

OB PLUG: Borland is the greatest company in the world...

Erick
--
Erick Herring
herring@evax.uta.edu

sulaiman@deluxb.cs.umass.edu (AMEER SULAIMAN) (02/25/91)

I have a dumb question....
	How do you create an executable file of your code?
A very annoyed
Ameer.
P.S. Thanx in advance.

migdol@ut-emx.uucp (Michael A. Migdol) (02/25/91)

In article <27118@dime.cs.umass.edu> sulaiman@deluxb.CS.UMASS.EDU (AMEER SULAIMAN) writes:
>
>I have a dumb question....
>	How do you create an executable file of your code?
    Buy your OWN copy, and stop breaking international copyright laws!!! 
(Especially because Borland has the very generous policy of not copy-protecting
their software so that backups may easily be made...)

>A very annoyed
>Ameer.
>P.S. Thanx in advance.
(You're NOT welcome!!!)


*****************************************************************************
*  Michael A. Migdol                  |    Disclaimer:                      *
*  migdol@emx.utexas.edu              |       "I may be wrong"              *
*  University of Texas, Austin        |           (Thanks Robert Fulgham!)  *
*****************************************************************************
*               "There's no such thing as a simple miracle"                 *
*****************************************************************************

CDCKAB%EMUVM1.BITNET@cunyvm.cuny.edu ( Karl Brendel) (02/25/91)

In article <44638@ut-emx.uucp>, migdol@ut-emx.uucp (Michael A.
  Migdol) wrote:

>In article <27118@dime.cs.umass.edu> sulaiman@deluxb.CS.UMASS.EDU (AMEE
> SULAIMAN) writes:
>>
>>I have a dumb question....
>>       How do you create an executable file of your code?
>    Buy your OWN copy, and stop breaking international copyright laws!!
>(Especially because Borland has the very generous policy of not
>copy-protecting their software so that backups may easily be
>made...)
>
>>A very annoyed
>>Ameer.
>>P.S. Thanx in advance.
>(You're NOT welcome!!!)
>
>***********************************************************************
>*  Michael A. Migdol                  |    Disclaimer:
>*  migdol@emx.utexas.edu              |       "I may be wrong"
>*  University of Texas, Austin        |           (Thanks Robert Fulgha
>***********************************************************************

Indeed, you may be wrong, Michael. You have the sound of a reformed
pirate yourself. Even so, you shouldn't leap to attack Ameer so
violently unless you have definite knowledge that he is using a
pirated copy.

Next time, consider directing an inquirer to the fine manual. In the
event that the person does not have a fine manual, the assistance
will be of little help. Perhaps s/he will then come forward and say,
"But I don't _have_ a fine manual!", in which case you will have a
more suitable opportunity for your attack.

Ameer, you are not the only person who has ever asked that question
legitimately. Refer to the User's Guide. If you are using version
5.X, see Chapter 2, "Beginning Turbo Pascal," "Where's the Code?" In
version 6, see Chapter 1, "Learning the new IDE," "Checking the
files you've created".

+--------------------------------------------------------------------+
| Karl Brendel                           Centers for Disease Control |
| Internet: CDCKAB@EMUVM1.BITNET         Epidemiology Program Office |
| Bitnet: CDCKAB@EMUVM1                  Atlanta, GA, USA            |
|                        Home of Epi Info 5.0                        |
+--------------------------------------------------------------------+

abcscnuk@csunb.csun.edu (Naoto Kimura (ACM)) (02/27/91)

In article <26113@adm.brl.mil> CDCKAB%EMUVM1.BITNET@cunyvm.cuny.edu ( Karl Brendel) writes:
>>In article <27118@dime.cs.umass.edu> sulaiman@deluxb.CS.UMASS.EDU (AMEE
>> SULAIMAN) writes:
>>>
>>>I have a dumb question....
>>>       How do you create an executable file of your code?
>...
>

If you're using versions previous to 4.0, you need to select the
"Options" item, then select compile to COM file, leave the Options
submenu back to the main menu, then select Compile.

If you're using version 4.0 or later, then you can either use the
command line version of the compiler or select the "Compile" pull-down
menu and select the "Destination" item to change it from "Memory" to
"Disk" (selecting this option toggles it).

                //-n-\\			 Naoto Kimura
        _____---=======---_____		 (abcscnuk@csuna.csun.edu)
    ====____\   /.. ..\   /____====
  //         ---\__O__/---         \\	Enterprise... Surrender or we'll
  \_\                             /_/	send back your *&^$% tribbles !!

pbinder@snuffy.HYWLMSD.WA.COM (Peter Binder) (03/01/91)

Could anybody give me any information about a Windows Developement Kit for Turbo Pascal?