Board index » delphi » Am I hitting the Limit here?

Am I hitting the Limit here?

Hi, I am writing a program in Turbo Pascal 7.0,
I am getting some very strange error and it
gets frustrating because I can not figure out what's wrong.

The Program has about 4100 lines so far and has several units.
When I reach a point executing a Procedure in one of the units
I encountered a "Unknown Identifier" Error on one of the
Global defined variables.

As a test I commented the variable out, then Build/compiled
the program.
Run up to the commented out offender and checked using Watch.
The variable registered just fine on the watch window.

I went back and forth a few times with the same results.
May I have reached the limit of the language?

The Compile/Information Window states the following values.

Code size 89712 byte
Data size  15640 byte
Stack size 16384 byte
Minimum Heap          0 byte
Maximum Heap 65536 byte

Dos        101k
IDE        307k
Symbols 126k
Program     0k
Free       103k

None of this info makes much sense to me but
If anybody can see what's going on here, please let me know.
Thanks.

--
Torsten

 

Re:Am I hitting the Limit here?


"torsten" <[email protected]> schreef in bericht
news:[email protected]

Quote
> Hi, I am writing a program in Turbo Pascal 7.0,
> I am getting some very strange error and it
> gets frustrating because I can not figure out what's wrong.

> The Program has about 4100 lines so far and has several units.
> When I reach a point executing a Procedure in one of the units
> I encountered a "Unknown Identifier" Error on one of the
> Global defined variables.

> As a test I commented the variable out, then Build/compiled
> the program.
> Run up to the commented out offender and checked using Watch.
> The variable registered just fine on the watch window.

> I went back and forth a few times with the same results.
> May I have reached the limit of the language?

> The Compile/Information Window states the following values.

> Code size 89712 byte
> Data size  15640 byte
> Stack size 16384 byte
> Minimum Heap          0 byte
> Maximum Heap 65536 byte

> Dos        101k
> IDE        307k
> Symbols 126k
> Program     0k
> Free       103k

> None of this info makes much sense to me but
> If anybody can see what's going on here, please let me know.
> Thanks.

> --
> Torsten

You are not even close to the limits of what TP can contain or compile.
You are much closer to the DOS limits here, since you have loaded the IDE
into the same memory that is also reserved for your program and heap
memory.
Since the compiler returned "Unknown identifier" this is what you have to
look for. If you did put all of your clobal vars into a unit, make sure
the unit is correctly written in the uses clause. Are you sure the name
of the var where the error occurs is written exactly the same as its
declaration?
Sometimes it helps to do a full re-build of all the units.

--Femme

Re:Am I hitting the Limit here?


I routinely delete all my *.tpu files and recompile.

This eliminates conflicting compiler directives or defined symbols that may
not have forced a rebuild of the affected units.

hth

Rufus

Quote
"torsten" <[email protected]> wrote in message news:[email protected]
> Hi, I am writing a program in Turbo Pascal 7.0,
> I am getting some very strange error and it
> gets frustrating because I can not figure out what's wrong.

Re:Am I hitting the Limit here?


Quote
On Tue, 26 Feb 2002 04:44:17 GMT, "torsten" <[email protected]> wrote:
>I encountered a "Unknown Identifier" Error on one of the
>Global defined variables.

I don't think that error could be caused by hitting a limit.

Re:Am I hitting the Limit here?


Thanks to everybody for responding to my question it has been of great help.
I have figured out what the problem was.
The Global variable was defined in the main Program, moving all declarations
out to one of the units solved the strange behavior.
Thanks

Quote
"torsten" <[email protected]> wrote in message

news:[email protected]
Quote
> Hi, I am writing a program in Turbo Pascal 7.0,
> I am getting some very strange error and it
> gets frustrating because I can not figure out what's wrong.

> The Program has about 4100 lines so far and has several units.
> When I reach a point executing a Procedure in one of the units
> I encountered a "Unknown Identifier" Error on one of the
> Global defined variables.

> As a test I commented the variable out, then Build/compiled
> the program.
> Run up to the commented out offender and checked using Watch.
> The variable registered just fine on the watch window.

> I went back and forth a few times with the same results.
> May I have reached the limit of the language?

> The Compile/Information Window states the following values.

> Code size 89712 byte
> Data size  15640 byte
> Stack size 16384 byte
> Minimum Heap          0 byte
> Maximum Heap 65536 byte

> Dos        101k
> IDE        307k
> Symbols 126k
> Program     0k
> Free       103k

> None of this info makes much sense to me but
> If anybody can see what's going on here, please let me know.
> Thanks.

> --
> Torsten

Re:Am I hitting the Limit here?


hi

"torsten" <[email protected]> schrieb im Newsbeitrag
news:[email protected]

Quote
> Thanks to everybody for responding to my question it has been of great
help.
> I have figured out what the problem was.
> The Global variable was defined in the main Program, moving all
declarations
> out to one of the units solved the strange behavior.
> Thanks

no strange behavior.

program a;
uses b;

var global: integer;

begin
end.

there is no var 'global' in unit b. that's all.

unit b is compiled first, not knowing the later defined var 'global'.

but you solved it the right way.

regards
jochen

a small piece of source here and the problem was solved in a few
minutes.

Quote
> "torsten" <[email protected]> wrote in message
> news:[email protected]
> > Hi, I am writing a program in Turbo Pascal 7.0,
> > I am getting some very strange error and it
> > gets frustrating because I can not figure out what's wrong.

> > The Program has about 4100 lines so far and has several units.
> > When I reach a point executing a Procedure in one of the units
> > I encountered a "Unknown Identifier" Error on one of the
> > Global defined variables.

> > As a test I commented the variable out, then Build/compiled
> > the program.
> > Run up to the commented out offender and checked using Watch.
> > The variable registered just fine on the watch window.

> > I went back and forth a few times with the same results.
> > May I have reached the limit of the language?

[...]

Other Threads