@@ The first section will have to be changed according to the actual
   release.

This is the announcement of

    GNU Pascal, alpha version gpc-200004xx

which is now available from

    ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/alpha/ .

Binaries for various platforms are available in a subdirectory
`binary/'.  These platforms include:

    i586-pc-linux-gnulibc1
    i586-pc-linux-gnu
    alpha-unknown-linux-gnu
    alphaev56-dec-osf4.0d
    mips-sgi-irix6.2
    sparc-sun-solaris2.6
    i386-pc-djgppv201 (MS-DOS)

Binaries for more platforms, including ix86-mingw32 (MS-Windows
9x/NT) and sparc-sun-solaris2.5.1 will follow soon and be announced
separately.

This is meant to be the final alpha release before the release of
GPC 2.1. Unless users are experiencing serious problems with it, a
beta version will follow soon which will be identical to GPC 2.1
modulo possible bug fixes.

If you have problems with this release or urgent suggestions for
GPC 2.1, please contact us at the GPC mailing list <gpc@gnu.de>
immediately.


About GNU Pascal
================

The GNU Pascal Compiler (GPC) is part of the GNU compiler
family, GNU CC or GCC.  It combines a Pascal front-end with the
proven GNU C back-end for code generation and optimization.
Unlike utilities such as p2c, this is a true compiler, not just
a converter.

This version of GPC corresponds to GCC version 2.8.1 or 2.95.x.

The purpose of the GNU Pascal project is to produce a Pascal
compiler which:

1) combines the clarity of Pascal with powerful tools suitable
   for real-life programming,

2) supports both the Pascal standard and the Extended Pascal
   standard as defined by ISO, ANSI and IEEE (ISO 7185:1990,
   ISO/IEC 10206:1991, ANSI/IEEE 770X3.160-1989),

3) supports other Pascal standards (UCSD Pascal, Borland Pascal,
   Pascal-SC) in so far as this serves the goal of clarity and
   usability,

4) may be distributed under GNU license conditions,

5) can generate code for and run on any computer for which the
   GNU C compiler can generate code and run on.

Pascal was originally designed for teaching.  GNU Pascal provides a
smooth way to proceed to challenging programming tasks without
learning a completely different language.

The current release implements Standard Pascal (ISO 7185, level 1),
a large subset of Extended Pascal (ISO 10206, aiming for full
compliance), is highly compatible to Borland Pascal (version 7.0)
with some Delphi extensions, and provides a lot of useful GNU
extensions.

For more information about GNU Pascal, see

    http://home.pages.de/~GNU-Pascal/


Changes since the previous beta release
=======================================

There's a large number of bug fixes, too many to mention here. They
are listed in the `Fixed Bugs' section of the GPC To-Do list
<http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html>. The
most important bugs fixed include the unit/module initialization in
the wrong order, and not working at all on some systems, the global
goto bug, some "two-unit bugs" and a number of BP compatibility
issues.

There's a number of new or changed features which are listed in the
following. Features without further description refer to new
routines or options.

This release of GPC has been cleaned up substantially. Consequently,
a few old and obsolete features have been dropped or replaced by
clearer, more flexible or otherwise more useful ones. This might
lead to minor problems with old programs, but we suppose they're
very rare (many programmers might not even know about the old
features) and easy to overcome. The most important ones are listed
here, the rest of them is contained in the following sections and
marked with `(@)'.

- The internal file handling in the RTS was changed from using
  `FILE *' pointers to integer file handles, to make it more
  efficient and to get rid of some problems. Accordingly, the
  `CFile' field in `BindingType' was replaced by a `Handle' field,
  the `AssignCFile' procedure by an `AssignHandle' procedure, and
  the `GetFile' function was removed (a substitute is the function
  `FileHandle' which has already existed in previous releases).

- The option `--no-nested-comments' (to allow comments like `{ *)'
  as the standard requires) has been renamed to `--mixed-comments'
  (note the inverted value). Accordingly, the compiler directives
  `{$N+}' and `{$N-}' have been renamed to `{$no-mixed-comments}'
  and `{$mixed-comments}'. The default, when no dialect options are
  given, is still `--no-mixed-comments' (i.e., what used to be
  `--nested-comments').

- A new option `--nested-comments' to allow real nested comments
  like `{ { } }' (also available as a compiler switch, like almost
  all command-line options). Note the new meaning of this switch, so
  if you used it before, you'll probably have to change it to
  `--no-mixed-comments' (see above). If nested comments are enabled,
  comments are also allowed within compiler directives and macros
  (but no compiler directives within other compiler directives).

- C style character escapes (`\n', `\007' etc.) are now the
  default for strings enclosed in double quotes, while single quoted
  strings do not allow them (according to the standard).
  Accordingly, a verbatim `"' in a double quoted string is now
  obtained with `\"' rather than `""' (but a verbatim `'' in a
  single quoted string still with `''', of course). Therefore, the
  option `--[no-]char-escapes' and the compiler directive
  `{$E+}'/`{$E-}' have been dropped. If you used these features,
  please change to the appropriate kind of quotes.

- Macros are no more expanded in `--borland-pascal' and `--delphi'
  modes. Expanding them causes a few problems with strange sources
  written for BP which use the same name for a conditional define
  and an identifier. Macros can be turned on/off independently from
  the dialect with the new switches `--[no-]macros'. (B)

- Macros and conditionals defined with `{$define}' are now
  case-insensitive (B). Macros and conditionals defined with
  `--define' on the command line are still case-sensitive for
  compatibility to other GNU compilers. In addition, GPC provides
  `{$csdefine}' or `--csdefine' and `{$cidefine}' or `--cidefine'
  to define case sensitive or insensitive macros or conditionals,
  respectively. If you have defined macros or conditionals with
  `{$define}' and rely on them being case-sensitive, change it to
  `{$csdefine}' now.

- The mechanism for including GPC code into code written in other
  languages has changed and is now more robust. A header gpc-in-c.h
  is provided for inclusion of GPC code into C programs, and a demo
  program GPC_C_Pas (together with C code calling it) is supplied to
  demonstrate this. (Including C code into GPC programs works as
  before.)

- The preprocessor is now called `gpcpp' (it was `gpc-cpp' before).
  If you have installed an older GPC version, please remove gpc-cpp
  now. If you have any scripts that refer to gpc-cpp directly,
  change the reference to gpcpp. If you use DJGPP, and you added the
  GPC specific parts to djgpp.env as described in the FAQ, please
  change `[gpc-cpp]' to `[gpcpp]'.


Command line options and compiler directives:
---------------------------------------------

- `{$ifopt}' works now, with short directives like in BP
  (`{$ifopt X+}') (B) and also with long directives
  (`{$ifopt extended-syntax}')
- Local compiler directives and defines can be specified with
  `{$local}' and `{$endlocal}'.
- Delphi (or C++) style `//' comments in default and `--delphi'
  modes, and a switch `--[no-]delphi-comments' to turn them on/off
  explicitly. (D)
- -W[no-]typed-const (warn about BP style misuse of typed
  constants)
- -W[no-]near-far (warn about use of the obsolete BP compatible
  `near' and `far' directives)
- -W[no-]mixed-comments (warn about use of mixed comments)
- -W[no-]nested-comments (warn about use of nested comments)
- -W[no-]field-name-problem (don't warn about a problem with field
  names)
- -W[no-]warnings (enable/disable warnings)
- All `-Wfoo' warning options also work as `{$W foo}' compiler
  directives. In contrast to the last alpha release, there must now
  be a space after the `W'. (@)
- --no-default-paths (disable standard unit etc. paths)
- --no-unit-path, --no-object-path (disable any unit/object paths
  given so far)
- --[no-]io-checking (same as `{$I+}', `{$I-}')
- --[no-]stack-checking, also as compiler directives
  `{$[no-]stack-checking}' or `{$S+}'/`{$S-}' (B)
- --[no-]typed-address, also as compiler directives
  `{$[no-]typed-address}' or `{$T+}'/`{$T-}' (B)
- --[no-]transparent-file-names (derive the external file
  names from the file variable names
- --[no-]progress-messages, --[no-]progress-bar (output information
  to give progress messages or display a progress bar while
  compiling, using suitable utilities)
- {$[no-]debug-statement[=foo]} (call a procedure automatically
  before each statement for debugging)
- The `--[no-]c-numbers' switch has been removed. If you really
  used C style octal or hex numbers (`0400', `0xf00'), you can
  easily convert them to the Extended Pascal notation (`8#400',
  `16#f00') or (hex only) to the Borland Pascal notation (`$foo'). (@)
- `{$gnu-pascal}' is now completely equivalent to `--gnu-pascal';
  `{$gnu-pascal}' has been added to all units shipped with GPC, so
  they can also be compiled when `--borland-pascal' or other dialect
  options are given on the command line.
- `{$if}' directives now understand Pascal operators like `and',
  `or', `not' (C operators are also still understood).
- `{$P+}'/`{$P-}' was replaced by `{$[no-]pedantic}' (or
  `--[no-]pedantic' on the command line)
- The single-letter compiler directives are now BP compatible. Those
  that are not meaningful or not necessary in GPC (e.g. `{$F+}',
  `{$O...}', or `{$M}' with only numbers following) are ignored in
  `--borland-pascal' mode and warned about otherwise. (B)
  Note: `{$W+}'/`{$W-}' is now also ignored in `--borland-pascal'
  mode (it is the only single-letter directive left that has a
  different meaning in BP and in GPC, and besides, the BP meaning
  can be safely ignored in GPC). To enable/disable warnings in
  `--borland-pascal' mode, you can use `{$W [no-]warnings}' now. (@)
- The RTS command line options are now also available as long
  options; new RTS options `--version' (print RTS version and exit),
  `--abort-on-error' (abort with SIGABRT on runtime error),
  `--error-file', `--error-fd' (dump runtime error messages and
  strack trace to given file name or FD).
- RTS command line options are now recognized after `--gpc-rts'
  instead of `-Grts'. (@)
- Files with `.pp' or `.dpr' extension are recognized as Pascal
  sources. (D)


Compiler and RTS built-in declarations:
---------------------------------------

Some of the following declarations are built into the compiler,
others are declared in the `GPC' module.

- Types etc.:

  - `nil' is accepted as a value of any procedural/functional type (B)
  - ByteBool, ShortBool, WordBool, MedBool, LongBool, LongestBool,
    Boolean(42) (D?)
  - `register' directive
  - Directives with double underscores like `__asmname__'
    `__inline__' have been dropped. The same directives without
    underscores have been available for a long time. Furthermore,
    GPC now supports `^const' to create a pointer to a constant
    (which could be done in a C like fashion with the `__const__'
    directive before). (@)
  - Type qualifiers like `__byte__' or `__unsigned__' have been
    dropped. GPC has been supporting "real" type names like `Byte'
    or `ByteWord' for a long time, and it's easy to change to them.
    Similar for `__cstring__' and `__void__' where `CString' and
    `Void' are available. (@)
  - `mod' with negative right operand now works like in BP. (B)
  - Expressions like `-2 * +3' are now allowed without paretheses. (B)

- Files and I/O:

  - PathExists
  - DataDirectoryName
  - AssignBinary
  - HasWildCardsOrBraces
  - BraceExpand
  - MultiFileNameMatch
  - GlobOn
  - MultiGlob
  - MultiGlobOn
  - QuoteFileName
  - UnQuoteFileName
  - FExpandQuoted
  - ForceAddDirSeparator
  - FindNonQuotedChar
  - FindNonQuotedStr
  - NameExtFromPath
  - ChMod
  - IOSelect
  - IOSelectRead
  - FileNameLoCase
  - FileNamesCaseSensitive (constant)
  - DirRoot (constant)
  - QuotingCharacter (constant)
  - EnvVarChars (constant)
  - EnvVarCharsFirst (constant)
  - WildCardChars (constant)
  - FileNameSpecialChars (constant)
  - ShellExecCommand (constant)
  - DataReady renamed to CanRead (@)
  - New parameter `Quoted' to RelativePath (@)
  - New parameter `Prefix' to `ConfigFileName' (@)
  - ExpandEnvironment recognizes `~user'
  - New fields `User', `Group', `Mode' and `INode', `SymLink',
    `TextBinary', `Special' in BindingType; field `Size' removed (@)
  - The variable `TextFilesBinary' has been dropped. Instead, you
    can now use the procedure `AssignBinary' or the field
    `TextBinary' in BindingType. (@)
  - File sizes can now be bigger than `Integer' (e.g. 64 bit files
    on 32 bit machines) if supported by the OS via llseek() (e.g.
    Linux, Solaris).

- Strings:

  - Integer2String
  - IsUpCase, IsLoCase, IsAlphaNum, IsAlphaNumUnderscore,
    IsPrintable
  - Renamed the CString routines in the RTS so they get a `CString'
    prefix, moved the BP compatibility identifiers for the same
    routines into the `Strings' unit (B) (@)
  - MemCompCase
  - StrEqualCase
  - PosCase, LastPosCase, PosFromCase, LastPosTillCase
  - IsPrefixCase, IsSuffixCase
  - LineBreak (constant)
  - SetEnv (obsoletes libc's PutEnv (@))
  - UnSetEnv
  - GetCEnvironment
  - The environment variable management is now implemented in
    Pascal, so it's independent of libc differences (e.g. the
    presence or not of `environ'). Access via `GetEnv' etc. works
    unchanged.
  - The `Environment' variable is now a schema which contains the
    environment variables as CStrings. (@)
  - Empty and case-sensitive environment variables are allowed
    within GPC programs even under Dos.

- Random:

  - SeedRandom
  - SeedRandomPtr (variable)
  - Randomize is called automatically when necessary (except when
    using the BP compatible random number generator in the System
    unit (B)).

- Memory:

  - ReAlloc; previous ReAlloc function (libc) renamed to CReAlloc (@)
  - ReAllocPtr (variable)
  - ReleaseCount
  - AllocateBigMem, DisposeBigMem, MoveToBigMem, MoveFromBigMem,
    MapBigMem for uniform access to big memory blocks for GPC and BP (B)

- Time:

  - Sleep
  - SleepMicroSeconds
  - GetCPUTime
  - GetMicroSecondTime

- Misc:

  - Include and Exclude for sets (B)
  - IsInfinity
  - IsNotANumber
  - SplitReal
  - ReturnAddress
  - FrameAddress
  - Runtime errors are now printed with their address to help
    debugging (using addr2line), and the address is stored in
    ErrorAddr. (B)
  - RegisterRestoreTerminal
  - UnregisterRestoreTerminal
  - RestoreTerminal
  - ExecuteNoTerminal
  - SetProcessGroup
  - SetTerminalProcessGroup
  - GetTerminalProcessGroup
  - GetShellPath
  - GetPasswordEntryByName
  - GetPasswordEntryByUID
  - GetPasswordEntries
  - StrSignal
  - Kill
  - WaitPID
  - InstallSignalHandler
  - Constants for the signals


Units:
------

- CRT:

  - Works now under Cygwin and mingw.
  - DJGPP: support for 40 column modes (requires updated PDCurses
    library)
  - Renamed the the conditional to get an X11 version from XCURSES
    to X11. (@)
  - SimulateBlockCursor, SimulateBlockCursorOff
  - Curses is not initialized at the beginning of the program, but
    rather when the first CRT routine is called. (B)
  - CRTInit to explicitly initialize CRT and also set some defaults
    (PCCharSet and update level) to more natural (and less BP
    compatible) values.
  - CRTAutoInitProc (variable)
  - CRTNotInitialized
  - Any of the parameters to GetWindow may now be null.
  - Support for panels (overlapping windows): GetActivePanel,
    PanelNew, PanelDelete, PanelBindToBackground,
    PanelIsBoundToBackground, PanelActivate, PanelHide, PanelShow,
    PanelHidden, PanelTop, PanelBottom, PanelMoveAbove,
    PanelMoveBelow, PanelAbove, PanelBelow, IgnoreCursor
  - Replaced the variables PCCharSet and UseControlChars by routines
    SetPCCharSet, GetPCCharSet, SetControlChars, GetControlChars. (@)
  - CRTUpdate
  - CRTRedraw
  - SetScroll
  - CRTSetCursesMode
  - RestoreTerminalClearCRT
  - Catch some signals and return pseudo function keys for them if
    CheckBreak is False.
  - React to screen size changes by external events and return a
    pseudo function key.
  - Reduced the (already small) system-dependent code, and added an
    overview of the few problematic features in the comment at the
    beginning of crt.pas.

- RegEx:

  - RegExPosFrom
  - CharSet2RegEx
  - Support for converting subexpression or complete matching
    references to upper or lower case while replacing them with
    `\u7' or `\l7'.

- GMP:

  - mpf_exp
  - mpf_ln
  - mpf_pow
  - mpf_arctan
  - mpf_pi

- System:

  - SetTextBuf (B)
  - RealToBPReal, BPRealToReal to convert between binary BP
    compatible 6 byte reals and GPC's reals (useful, e.g., for
    binary file exchange with BP programs) (B)
  - Renamed the `__BP_INTEGERS__' conditional to
    `__BP_TYPE_SIZES__'. (@)

- Dos, WinDos:

  - Renamed the `_Borland_16_Bit_' conditional to
    `__BP_TYPE_SIZES__'. (@)
  - Added a few unportable Dos-only routines under DJGPP if
    `__BP_UNPORTABLE_ROUTINES__' is defined. (B)

- Pipe:

  - New parameter `Process' to Pipe (@)
  - WaitPipeProcess

- PExecute:

  - Integrated into the RTS so you don't need a `uses PExecute'
    anymore. (@)

- GetOpt:

  - Integrated into the RTS so you don't need a `uses GetOpt'
    anymore. (@)
  - Renamed the variables and constants used (see gpc.pas under
    `Command Line Option Parsing'). (@)

- HeapMon: New unit for (simple) heap checking.

- Trap: New unit for runtime error trapping.

- MD5: New unit for computing MD5 message digests.

- FileUtils: New unit with some file and directory utilities.

- GPC-BP: A `GPC' unit for BP to provide some GPC compatibility to
  BP programs and make it easier to gradually convert them to GPC. (G)


A few of the units (in particular: CRT, GMP and RegEx) require
libraries. The sources of the libraries, with small patches where
necessary, as well as binaries for i586-pc-linux-gnu,
i586-pc-linux-gnulibc1, m68k-linux, sparc-sun-solaris2,
i386-pc-go32, i386-pc-cygwin32 and i386-pc-mingw32 are available
from

    ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/libs/ .


Demo programs:
--------------

There is a number of new demo programs to demonstrate some features
of the compiler and the units. The demo programs are part of source
and binary GPC distributions. After installation, they can be found
in <prefix>/doc/gpc/demos/ .


Test suite:
-----------

The test suite is used to verify that all features of GPC work as
expected and to reproduce bugs reported. Test programs for bugs
found by users and for new features are constantly added. The test
suite is part of source, not binary, GPC distributions.

- As usual, many new tests have been added to the test suite.
- The few system-dependent checks have been equipped with checks
  about the system properties, and are skipped on systems on which
  they are not applicable.
- The old dejagnu tests have been integrated in the test suite.
- `make check' now runs the current test suite (as `make check2-gpc'
  did before) rather than the (now removed) dejagnu tests.
- The README file (or `BUGS' in binary distributions) describes all
  features of the testing environment, to make it easier for users
  to construct even exotic new tests, and contains some generic
  instructions on reporting bugs.
- The test suite now produces a summary output by default. To get
  the long output format as before, run `make check-gpc-long' now.


Legend:
-------

`(@)': minor backward-incompatibility
`(B)': BP compatibility
`(D)': Delphi compatibility
`(G)': GPC compatibility :-)


Have fun,

    The GNU Pascal Development Team
