View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002664 | JEDI Code Library | JclWideFormat | public | 2005-02-20 13:12 | 2005-02-21 12:00 |
Reporter | rkennedy | Assigned To | Robert Rossmair | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Delphi 2005 | OS | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | Version 1.95 | |||
Summary | 0002664: Internal error C6662 when compiling | ||||
Description | Jens Fudickar reported in jedi.jcl that JclWideFormat won't compile in Delphi 2005 because of an internal error. This submission should fix that error. | ||||
Steps To Reproduce | The problem, apparently, is in WideFormat's nested procedure, EnsureResultLen. Redefine it to take a "var" parameter for ResultLen, and move it above all the var and const declarations, so the WideFormat function starts out like this: function WideFormat(const Format: WideString; const Args: array of const): WideString; procedure EnsureResultLen(const NeededLen: Cardinal; var AResultLen: Cardinal); begin if NeededLen > AResultLen then begin repeat AResultLen := AResultLen * 2; until NeededLen <= AResultLen; SetLength(Result, AResultLen); end; end; That procedure gets called in two places. Ammend them to take ResultLen as their second parameter. Those changes resolve the internal error, but trigger a bogus compiler warning in its place. To fix the warning, initialize the Wide parameter with the other variable initializations, as follows: // Avoid compiler warnings LeftAlign := False; AnsiCount := 0; FormatStart := 0; Wide := False; | ||||
Tags | No tags attached. | ||||
Fixed in GIT commit | |||||
Fixed in SVN revision | |||||
IDE version | |||||
has duplicate | 0002662 | resolved | Robert Rossmair | Installation |
2005-02-21 11:15
|
JclWideFormat.pas (35,404 bytes) |
|
Problem with BCB6 (internal error DBG1384) still present. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-02-20 13:12 | rkennedy | New Issue | |
2005-02-21 11:15 | rkennedy | File Added: JclWideFormat.pas | |
2005-02-21 12:00 | Robert Rossmair | Status | new => resolved |
2005-02-21 12:00 | Robert Rossmair | Fixed in Version | => Version 1.95 |
2005-02-21 12:00 | Robert Rossmair | Resolution | open => fixed |
2005-02-21 12:00 | Robert Rossmair | Assigned To | => Robert Rossmair |
2005-02-21 12:00 | Robert Rossmair | Note Added: 0006541 | |
2005-02-21 12:01 | Robert Rossmair | Relationship added | related to 0002662 |
2005-02-21 12:02 | Robert Rossmair | Relationship replaced | has duplicate 0002662 |