⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tres.pas

📁 Turbo Pascal 6.0编译器源码
💻 PAS
📖 第 1 页 / 共 3 页
字号:
uses Objects, Drivers, Views, Menus, Dialogs, TMenu, TStatus, TVars, Reg,
  TStdDlg, Controls, EvalDlg, WatchWin, BptDlg, CpuWin, OutputWn, CalStkWn,
  CompWind, Help, TColors, Config, Context, StrNames, Utils, CompVars, TEdit;

var

  T: TResourceFile;
  CommandTable: TFCommandTable;
  S: TDosStream;

procedure P(S: string; A: PObject);
begin
  T.Put(A, S);
  Dispose(A, Done);
end;

function FormStrings: PStrListMaker;
var
  S: PStrListMaker;
begin
  S := New(PStrListMaker, Init(32768, 1000));
  S^.Put(sMsgBase + mfWarning, 'Warning');
  S^.Put(sMsgBase + mfError, 'Error');
  S^.Put(sMsgBase + mfInformation, 'Information');

  S^.Put(sOutOfMemory, 'There is not enough memory available to complete operation.');
  S^.Put(sNoResource, 'Resource not found: %s.');
  S^.Put(sValueNotInRange, 'Value not within the valid range. Valid range is:'^M^J^C'%d - %d');
  S^.Put(sInvalidFileName, 'Invalid file name or extension.');
  S^.Put(sTurboTplNotFound, 'TURBO.TPL not found.');
  S^.Put(sInvalidTurboTpl, 'TURBO.TPL is invalid.');
  S^.Put(sInvalidDir, 'Invalid drive or directory.');
  S^.Put(sDosShellPrompt, 'Type EXIT to return to Turbo Pascal...');
  S^.Put(sTerminateDebugging, 'DOS shell will terminate current debugging session.');
  S^.Put(sInvalidAddress, 'Invalid address value. Format is "xxxx:yyyy".');
  S^.Put(sErrorUpdatingTurboExe, 'Error updating TURBO.EXE file.');
  S^.Put(sTurboTpl, 'TURBO.TPL');
  S^.Put(sStartupOptions, 'Changes are written directly to TURBO.EXE and do not take effect until you reload the IDE.');
  S^.Put(sTileError, 'Tile/Cascade area too small to complete request.');
  S^.Put(sNoMemoryForCommandTable, 'Not enough memory to load new editor key bindings. Old bindings retained.');
  S^.Put(sInvalidHeapLimits, 'Low heap limit greater than high heap limit.');
  S^.Put(sNoMemoryForTurboTpl, 'Not enough memory to load TURBO.TPL.');

  S^.Put(sSetInvalidBpt, 'Invalid breakpoint in %s on line %d. Set breakpoint anyway?');
  S^.Put(sTooManyBpts, 'Too many breakpoints.');
  S^.Put(sClearInvalidBpt, 'Invalid breakpoint(s) encountered. Clear all invalid breakpoints?');
  S^.Put(sNoDebugInfo, 'No debug info for program entry point. Run anyway?');
  S^.Put(sNoCodeForLine, 'No code generated for this line.');
  S^.Put(sFatalBreak, 'User break. Program terminated.');
  S^.Put(sUserBreak, 'User break in %s line %d.');
  S^.Put(sLineTooComplex, 'Line too complex for step or trace.');
  S^.Put(sNoMemToRun, 'Not enough memory to run program.');
  S^.Put(sCantLoadExe, 'Cannot load EXE file.');
  S^.Put(sCantRunUnit, 'Cannot run a unit.');
  S^.Put(sInvalidCondition, 'Invalid condition: %s.');
  S^.Put(sConditionTrue, 'Conditional breakpoint "%s" in %s line %d is true.');
  S^.Put(sSourceModified, 'Source has been modified. Rebuild?');
  S^.Put(sProcNotFound, 'Procedure not found.');
  S^.Put(sTooManyBptsInFile, 'Too many breakpoints in file.');
  S^.Put(sPressAnyKeyToReturn, 'Press any key to return...');
  S^.Put(sCantFindSource, 'Cannot find source file. Source position is %s line %d.');
  S^.Put(sErrorAddressNotFound, 'Error address not found.');

  S^.Put(sError, 'Error %d: %s.');
  S^.Put(sErrorParam, 'Error %d: %s (%s).');

  S^.Put(sErrorBase, 'Target address found');
  S^.Put(sErrorBase + 1, 'Out of memory');
  S^.Put(sErrorBase + 2, 'Identifier expected');
  S^.Put(sErrorBase + 3, 'Unknown identifier');
  S^.Put(sErrorBase + 4, 'Duplicate identifier');
  S^.Put(sErrorBase + 5, 'Syntax error');
  S^.Put(sErrorBase + 6, 'Error in real constant');
  S^.Put(sErrorBase + 7, 'Error in integer constant');
  S^.Put(sErrorBase + 8, 'String constant exceeds line');
  S^.Put(sErrorBase + 9, 'Too many nested files');
  S^.Put(sErrorBase + 10, 'Unexpected end of file');
  S^.Put(sErrorBase + 11, 'Line too long');
  S^.Put(sErrorBase + 12, 'Type identifier expected');
  S^.Put(sErrorBase + 13, 'Too many open files');
  S^.Put(sErrorBase + 14, 'Invalid filename');
  S^.Put(sErrorBase + 15, 'File not found');
  S^.Put(sErrorBase + 16, 'Disk full');
  S^.Put(sErrorBase + 17, 'Invalid compiler directive');
  S^.Put(sErrorBase + 18, 'Too many files');
  S^.Put(sErrorBase + 19, 'Undefined type in pointer definition');
  S^.Put(sErrorBase + 20, 'Variable identifier expected');
  S^.Put(sErrorBase + 21, 'Error in type');
  S^.Put(sErrorBase + 22, 'Structure too large');
  S^.Put(sErrorBase + 23, 'Set base type out of range');
  S^.Put(sErrorBase + 24, 'File components may not be files or objects');
  S^.Put(sErrorBase + 25, 'Invalid string length');
  S^.Put(sErrorBase + 26, 'Type mismatch');
  S^.Put(sErrorBase + 27, 'Invalid subrange base type');
  S^.Put(sErrorBase + 28, 'Lower bound greater than upper bound');
  S^.Put(sErrorBase + 29, 'Ordinal type expected');
  S^.Put(sErrorBase + 30, 'Integer constant expected');
  S^.Put(sErrorBase + 31, 'Constant expected');
  S^.Put(sErrorBase + 32, 'Integer or real constant expected');
  S^.Put(sErrorBase + 33, 'Pointer type identifier expected');
  S^.Put(sErrorBase + 34, 'Invalid function result type');
  S^.Put(sErrorBase + 35, 'Label identifier expected');
  S^.Put(sErrorBase + 36, 'BEGIN expected');
  S^.Put(sErrorBase + 37, 'END expected');
  S^.Put(sErrorBase + 38, 'Integer expression expected');
  S^.Put(sErrorBase + 39, 'Ordinal expression expected');
  S^.Put(sErrorBase + 40, 'Boolean expression expected');
  S^.Put(sErrorBase + 41, 'Operand types do not match operator');
  S^.Put(sErrorBase + 42, 'Error in expression');
  S^.Put(sErrorBase + 43, 'Illegal assignment');
  S^.Put(sErrorBase + 44, 'Field identifier expected');
  S^.Put(sErrorBase + 45, 'Object file too large');
  S^.Put(sErrorBase + 46, 'Undefined external');
  S^.Put(sErrorBase + 47, 'Invalid object file record');
  S^.Put(sErrorBase + 48, 'Code segment too large');
  S^.Put(sErrorBase + 49, 'Data segment too large');
  S^.Put(sErrorBase + 50, 'DO expected');
  S^.Put(sErrorBase + 51, 'Invalid PUBLIC definition');
  S^.Put(sErrorBase + 52, 'Invalid EXTRN definition');
  S^.Put(sErrorBase + 53, 'Too many EXTRN definitions');
  S^.Put(sErrorBase + 54, 'OF expected');
  S^.Put(sErrorBase + 55, 'INTERFACE expected');
  S^.Put(sErrorBase + 56, 'Invalid relocatable reference');
  S^.Put(sErrorBase + 57, 'THEN expected');
  S^.Put(sErrorBase + 58, 'TO or DOWNTO expected');
  S^.Put(sErrorBase + 59, 'Undefined forward');
  S^.Put(sErrorBase + 60, 'Cannot be modified');
  S^.Put(sErrorBase + 61, 'Invalid type cast');
  S^.Put(sErrorBase + 62, 'Division by zero');
  S^.Put(sErrorBase + 63, 'Invalid file type');
  S^.Put(sErrorBase + 64, 'Cannot Read or Write variables of this type');
  S^.Put(sErrorBase + 65, 'Pointer variable expected');
  S^.Put(sErrorBase + 66, 'String variable expected');
  S^.Put(sErrorBase + 67, 'String expression expected');
  S^.Put(sErrorBase + 68, 'Circular unit reference');
  S^.Put(sErrorBase + 69, 'Unit name mismatch');
  S^.Put(sErrorBase + 70, 'Unit version mismatch');
  S^.Put(sErrorBase + 71, '');
  S^.Put(sErrorBase + 72, 'Unit file format error');
  S^.Put(sErrorBase + 73, 'IMPLEMENTATION expected');
  S^.Put(sErrorBase + 74, 'Constant and CASE types do not match');
  S^.Put(sErrorBase + 75, 'Record variable expected');
  S^.Put(sErrorBase + 76, 'Constant out of range');
  S^.Put(sErrorBase + 77, 'File variable expected');
  S^.Put(sErrorBase + 78, 'Pointer expression expected');
  S^.Put(sErrorBase + 79, 'Integer or real expression expected');
  S^.Put(sErrorBase + 80, 'Label not within current block');
  S^.Put(sErrorBase + 81, 'Label already defined');
  S^.Put(sErrorBase + 82, 'Undefined label in preceding statement part');
  S^.Put(sErrorBase + 83, 'Invalid @ argument');
  S^.Put(sErrorBase + 84, 'UNIT expected');
  S^.Put(sErrorBase + 85, '";" expected');
  S^.Put(sErrorBase + 86, '":" expected');
  S^.Put(sErrorBase + 87, '"," expected');
  S^.Put(sErrorBase + 88, '"(" expected');
  S^.Put(sErrorBase + 89, '")" expected');
  S^.Put(sErrorBase + 90, '"=" expected');
  S^.Put(sErrorBase + 91, '":=" expected');
  S^.Put(sErrorBase + 92, '"[" or "(." expected');
  S^.Put(sErrorBase + 93, '"]" or ".)" expected');
  S^.Put(sErrorBase + 94, '"." expected');
  S^.Put(sErrorBase + 95, '".." expected');
  S^.Put(sErrorBase + 96, 'Too many variables');
  S^.Put(sErrorBase + 97, 'Invalid FOR control variable');
  S^.Put(sErrorBase + 98, 'Integer variable expected');
  S^.Put(sErrorBase + 99, 'File and procedure types are not allowed here');
  S^.Put(sErrorBase + 100, 'String length mismatch');
  S^.Put(sErrorBase + 101, 'Invalid ordering of fields');
  S^.Put(sErrorBase + 102, 'String constant expected');
  S^.Put(sErrorBase + 103, 'Integer or real variable expected');
  S^.Put(sErrorBase + 104, 'Ordinal variable expected');
  S^.Put(sErrorBase + 105, 'INLINE error');
  S^.Put(sErrorBase + 106, 'Character expression expected');
  S^.Put(sErrorBase + 107, 'Too many relocation items');
  S^.Put(sErrorBase + 108, '');
  S^.Put(sErrorBase + 109, '');
  S^.Put(sErrorBase + 110, '');
  S^.Put(sErrorBase + 111, 'Compilation aborted');
  S^.Put(sErrorBase + 112, 'CASE constant out of range');
  S^.Put(sErrorBase + 113, 'Error in statement');
  S^.Put(sErrorBase + 114, 'Cannot call an interrupt procedure');
  S^.Put(sErrorBase + 115, '');
  S^.Put(sErrorBase + 116, 'Must be in 8087 mode to compile this');
  S^.Put(sErrorBase + 117, 'Target address not found');
  S^.Put(sErrorBase + 118, 'Include files are not allowed here');
  S^.Put(sErrorBase + 119, '');
  S^.Put(sErrorBase + 120, 'NIL expected');
  S^.Put(sErrorBase + 121, 'Invalid qualifier');
  S^.Put(sErrorBase + 122, 'Invalid variable reference');
  S^.Put(sErrorBase + 123, 'Too many symbols');
  S^.Put(sErrorBase + 124, 'Statement part too large');
  S^.Put(sErrorBase + 125, '');
  S^.Put(sErrorBase + 126, 'Files must be var parameters');
  S^.Put(sErrorBase + 127, 'Too many conditional symbols');
  S^.Put(sErrorBase + 128, 'Misplaced conditional directive');
  S^.Put(sErrorBase + 129, 'ENDIF directive missing');
  S^.Put(sErrorBase + 130, 'Error in initial conditional defines');
  S^.Put(sErrorBase + 131, 'Header does not match previous definition');
  S^.Put(sErrorBase + 132, 'Critical disk error');
  S^.Put(sErrorBase + 133, 'Cannot evaluate this expression');
  S^.Put(sErrorBase + 134, 'Expression incorrectly terminated');
  S^.Put(sErrorBase + 135, 'Invalid format specifier');
  S^.Put(sErrorBase + 136, 'Invalid indirect reference');
  S^.Put(sErrorBase + 137, 'Structured variables are not allowed here');
  S^.Put(sErrorBase + 138, 'Cannot evaluate without System unit');
  S^.Put(sErrorBase + 139, 'Cannot access this symbol');
  S^.Put(sErrorBase + 140, 'Invalid floating point operation');
  S^.Put(sErrorBase + 141, 'Cannot compile overlays to memory');
  S^.Put(sErrorBase + 142, 'Procedure or function variable expected');
  S^.Put(sErrorBase + 143, 'Invalid procedure or function reference');
  S^.Put(sErrorBase + 144, 'Cannot overlay this unit');
  S^.Put(sErrorBase + 145, 'Too many nested scopes');
  S^.Put(sErrorBase + 146, 'File access denied');
  S^.Put(sErrorBase + 147, 'Object type expected');
  S^.Put(sErrorBase + 148, 'Local object types are not allowed');
  S^.Put(sErrorBase + 149, 'VIRTUAL expected');
  S^.Put(sErrorBase + 150, 'Method identifier expected');
  S^.Put(sErrorBase + 151, 'Virtual constructors are not allowed');
  S^.Put(sErrorBase + 152, 'Constructor identifier expected');
  S^.Put(sErrorBase + 153, 'Destructor identifier expected');
  S^.Put(sErrorBase + 154, 'Fail only allowed within constructors');
  S^.Put(sErrorBase + 155, 'Invalid combination of opcode and operands');
  S^.Put(sErrorBase + 156, 'Memory reference expected');
  S^.Put(sErrorBase + 157, 'Cannot add or subtract relocatable symbols');
  S^.Put(sErrorBase + 158, 'Invalid register combination');
  S^.Put(sErrorBase + 159, '286/287 instructions are not enabled');
  S^.Put(sErrorBase + 160, 'Invalid symbol reference');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -