📄 cpmem.pas
字号:
{*******************************************************************
* *
* COMPONENT for MS DOS and Windows source code. *
* *
* (c) 1992, Roderic D. M. Page *
* *
* Language: Turbo Pascal (Pascal with object-oriented extensions) *
* Compiler: Turbo Pascal 6.0 (MS DOS) *
* Turbo Pascal for Windows 1.0 (WINDOWS) *
* *
* Notes: Program interface is currently Windows specific. *
* *
*******************************************************************}
{$I CPDIR.INC}
unit cpmem;
{Install a heap error function. }
interface
function HeapFunc(Size: WORD):INTEGER;
{Set Turbo Pascal system variable HeapFunc to 1,
so that the procedures <\i New> and <\i GetMem> return
<\b nil> when they cannot allocate memory.
See TPW 1.0 Programmer's Guide, pp. 195-197.
}
implementation
{$F+}
function HeapFunc(Size: WORD):INTEGER;
begin
HeapFunc := 1;
end;
{$F-}
begin
HeapError := @HeapFunc;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -