Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-08

HeapError variable access

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Urbansound

Hi,

I'm working with a unit someone developed for FPC in 2001.

Compiling under FPC 2.0.0, I'm getting the following error...

    wErrors0.pp(279,23) Error: Identifier not found "HeapError"
From this code segment...
    procedure SetHeapErrorHandle;
    //===========================
    // Defines a new HeapError handler, from this library.
    const  fFirst : boolean = TRUE; // security, such that entering a second
time is harmless
    begin
        if (not fFirst) then exit;
        fFirst:=FALSE;  // the next time, will exit immediatly
          // Memorises the original Heap error handler
        glpfHeapErrorHandler:=HeapError;
          // defines the address of the new Heap Error handler.
        HeapError:=HeapErrorHandle;
    end;  // SetHeapErrorHandle

Section 8.4.2 of the prog.pdf doc "The Heap Grows", suggests that HeapError is a pointer that should be available for reference.

Any suggestions would be appreciated.

Mike

Peter Vreman
to Urbansound
you wrote 28 lines
Hi, I'm working with a unit someone developed for FPC in 2001. Compiling under FPC 2.0.0, I'm getting the following error... wErrors0.pp(279,23) Error: Identifier not found "HeapError" From this code segment... procedure SetHeapErrorHandle; //=========================== // Defines a new HeapError handler, from this library. const fFirst : boolean = TRUE; // security, such that entering a second time is harmless begin if (not fFirst) then exit; fFirst:=FALSE; // the next time, will exit immediatly // Memorises the original Heap error handler glpfHeapErrorHandler:=HeapError; // defines the address of the new Heap Error handler. HeapError:=HeapErrorHandle; end; // SetHeapErrorHandle Section 8.4.2 of the prog.pdf doc "The Heap Grows", suggests that HeapError is a pointer that should be available for reference. Any suggestions would be appreciated.

The variable is not supported and therefor removed to prevent misbehaviour.

Peter