[comp.lang.pascal] Any Question

Juergen_Conradi@hb.maus.de (Juergen Conradi) (06/21/91)

Hi,
A question from a absolut beginner.[Sorry for my bad English.]

My Problem with TVison's Editors.I will more as 900 lines loading into the
editor.No Chance (Error not enought memory) i have a AT - 2 MB Ram - MS-Dos
5.00.

who can help ?

Thanks.

Juergen

Ps:Answer please as NetMail
--
  Juergen Conradi - Niedersachsendamm 14 - D-2800 Bremen 61  - (+49) 421 870104
  -----------------------------------------------------------------------------
  MausNet: juergen conradi @ hb |  FidoNet: juergen conradi @ fido 2:241/2003.4
      E-Mail: juergen conradi @ hb.maus.de - Data (+49) 421 86675 (FAST)
   - Der Student studiert - Der Arbeiter arbeitet - Der Chef scheffelt -

bns@ersys.edmonton.ab.ca (Chris Dollmont) (06/24/91)

Juergen_Conradi@hb.maus.de (Juergen Conradi) writes:

> 
> Hi,
> A question from a absolut beginner.[Sorry for my bad English.]
> 
> My Problem with TVison's Editors.I will more as 900 lines loading into the
> editor.No Chance (Error not enought memory) i have a AT - 2 MB Ram - MS-Dos
> 5.00.
> 
Realize that the TurboVision Editor supports editing of data (text) that 
is on the _heap_, and therefore limited to 64K in size.  It doesn't 
matter that you have 2 Mb of RAM (DOS won't access above 640K anyway), 
you are still limited to the 64K heap size.

Chris

|  Chris Dollmont                   | USENET:  bns@ersys.edmonton.ab.ca
|  Blue North Software              |  Mail:    16936D 85th Ave.
|                                   |           Edmonton, AB T5R 4A3
|  These opinions remain valid only as long as they are visible...

dm2368@eecs1.eecs.usma.edu (Fichten Mark CPT) (06/24/91)

Chris Dollmont <bns@ersys.edmonton.ab.ca> writes:

> 
> Juergen_Conradi@hb.maus.de (Juergen Conradi) writes:
> 
> > 
> > Hi,
> > A question from a absolut beginner.[Sorry for my bad English.]
> > 
> > My Problem with TVison's Editors.I will more as 900 lines loading into the
> > editor.No Chance (Error not enought memory) i have a AT - 2 MB Ram - MS-Dos
> > 5.00.
> > 
> Realize that the TurboVision Editor supports editing of data (text) that 
> is on the _heap_, and therefore limited to 64K in size.  It doesn't 
> matter that you have 2 Mb of RAM (DOS won't access above 640K anyway), 
> you are still limited to the 64K heap size.
> 
> Chris
> 
> |  Chris Dollmont                   | USENET:  bns@ersys.edmonton.ab.ca
> |  Blue North Software              |  Mail:    16936D 85th Ave.
> |                                   |           Edmonton, AB T5R 4A3
> |  These opinions remain valid only as long as they are visible...
> 

WRONG ANSWER CHRIS!!!  Please forgive me for my attitude, but if you are
a software publisher and you put out incorrect information like what you
said above, this scares me!

Let me set the record straight...

You say:

> Realize that the TurboVision Editor supports editing of data (text) that 
> is on the _heap_, and therefore limited to 64K in size. 

The heap is not limited in any way to 64K in size!  I'll address this
error in a bit.

Turbo 5.5 was limited to editing files of 64K or smaller but NOT because
of the heap.  Turbo Pascal 6.0 is limited to files of 1Mb or smaller.
The total for all editors that are open on the desktop combined is 2 Mb's.
See the bottom of page 18 in the User's Guide.  Plain as day.  I have
edited files close to 1Mb without a problem.

Next, you said:

> It doesn't matter that you have 2 Mb of RAM (DOS won't access above 
> 640K anyway), you are still limited to the 64K heap size.

Well, I'll back off on the first part of the statement but.... the last
part is FALSE, FALSE, FALSE!  The heap is NOT limited in any way to 64K.
Try the following program on your computer:

begin
     writeln('There are ',MemAvail,' byte available on the heap.');
     writeln('The largest contiguous piece is ',MaxAvail,' bytes.');
end.

When I ran this program on my system, I got 504512 for both answers.  My
machine is networked and I have alot of stuff in memory, but for plain
vanilla computers you can get pretty close to 640K available.

Now, to illustrate where this 64K 'barrier' comes from.  I believe that
you 'tried' to say that a variable is limited to 64K in size.  This is
true, but the TP documentation disagrees.  The documentation says that
the larges variable can be 65520 bytes but 640K is 65536 bytes.  The
following will work:

var
     BigVariable : array[i..MAXINT] of Word;

This allocates (32767 * 2) = 65534 bytes of memory and it works fine.
The following will NOT work:

var
     BadBigVariable : array[i..MAXINT] of Real;

This allocates (32767 * 4) = 131068 bytes of memory and fails terribly.

The moral of this story is that you should not make statements that you
think MAY be true, and above all don't make the following statement in
you signature block because it really isn't at all true.

> These opinions remain valid only as long as they are visible...
> Chris Dollmont       
> Blue North Software 

Bye...
____________________________________________________________________________

CPT Mark Fichten      | INTERNET: fichten@eecs1.eecs.usma.edu              |
Captain U.S. Army     |           @trotter.edu:dm2368@eecs1.eecs.usma.edu  |
                      | USENET:   rutgers.edu!trotter!eecs1!dm2368         |
                      |           harvard.edu!trotter!eecs1!dm2368         |
____________________________________________________________________________