Russell Whitaker wrote:
On Thu, 22 Nov 2007, Scott Moore wrote:
{******************************************************************************
GPC standard ISO 7185 test failures
The following failures were found:
using latest gpc snapshot, gpc-20070904, the following error was gone:
fails.pas:93: error: ISO 7185 Pascal allows only simple constants
[..]
===============================================================================
C:\GPC\usr\test>gpc -Wno-warnings -o fails fails.pas
C:\GPC\usr\test>fails 1 10 100 2147483647 True False ===============================================================================
This appears to indicate the default fields for integer is set to 1.
As I see it, the default length is not 1, per se, but the length necessary to print the value as a string.
I'm sure it is a reasonable implementation. However, it does not match the ISO 7185 standard. It used to. What it is doing is matching Borland mode, so it appears that someone changed it to match Borland mode. That's fine, but there should exist a flag to change it back to ISO 7185 mode (as indeed the standard requires). For more information on the exact methods the standard requires to format ISO 7185 data, I recommend reading the standard itself.
In addition, it very clearly breaks the original examples that Wirth himself published with Pascal.
Scott Moore