This is gpc.info, produced by makeinfo version 4.0 from gpc.texi.

INFO-DIR-SECTION GNU programming tools
START-INFO-DIR-ENTRY
* GPC: (gpc).                   The GNU Pascal Compiler.
END-INFO-DIR-ENTRY
INFO-DIR-SECTION Individual utilities
START-INFO-DIR-ENTRY
* GPC: (gpc)Invoking GPC.       The GNU Pascal Compiler.
END-INFO-DIR-ENTRY

   This file documents the GNU Pascal Compiler.

   Copyright (C) 1988, 1996-2000 Free Software Foundation, Inc.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the sections entitled "GNU General Public License", "The GNU
Project", "The GNU Manifesto" and "Funding for Free Software" are
included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the sections entitled "GNU General Public
License", "The GNU Project", "The GNU Manifesto" and "Funding for Free
Software" and this permission notice, may be included in translations
approved by the Free Software Foundation instead of in the original
English.


File: gpc.info,  Node: object,  Next: Odd,  Prev: Null,  Up: Reference

object
======

Synopsis
--------

Description
-----------

   The keyword `object' is used to declare a new object type:

     type
       foo = object
         a: Integer;
         constructor Init;
         procedure Bar (x: Integer); virtual;
       end;

   (For a longer example, see *Note OOP::.)

Conforming to
-------------

   GNU Pascal follows the Borland Pascal 7.0 object model.

   ISO Pascal does not support Object-orientated programming. There is
an ANSI draft for an "Object Pascal" language which is not yet
supported by GPC, but planned. The Delphi language, also called "Object
Pascal" by Borland, is currently not supported by GPC either.

Example
-------

See also
--------

   *Note OOP::, *Note record::.


File: gpc.info,  Node: Odd,  Next: of,  Prev: object,  Up: Reference

Odd
===

Synopsis
--------

     function Odd (i: Integer): Boolean;

Description
-----------

   `Odd' checks the parity of its argument `i'. It returns `True' if
the argument is odd, `False' if it is even.

Conforming to
-------------

   `Odd' is defined in ISO-7185 Standard Pascal and supported by all
known Pascal variants.

Example
-------

     program OddDemo;
     var
       Foo: Integer;
     begin
       Write ('Please enter an odd number: ');
       ReadLn (Foo);
       if not Odd (Foo) then
         WriteLn ('Odd''s not even! Something''s odd out there ...')
       else
         WriteLn (Foo, ' is pretty odd.')
     end.

See also
--------


File: gpc.info,  Node: of,  Next: only,  Prev: Odd,  Up: Reference

of
==

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: only,  Next: operator,  Prev: of,  Up: Reference

only
====

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: operator,  Next: or,  Prev: only,  Up: Reference

operator
========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: or,  Next: or else,  Prev: operator,  Up: Reference

or
==

Synopsis
--------

     operator or (operand1, operand2: Boolean) = Result: Boolean;
   or
     operator or (operand1, operand2: INTEGER TYPE) = Result: INTEGER TYPE;
   or
     procedure or (var operand1: INTEGER TYPE; operand2: INTEGER TYPE);

Description
-----------

   In GNU Pascal, `or' has three built-in meanings:

  1. Logical "or" between two `Boolean'-type expressions.  The result
     of the operation is of `Boolean' type.

     By default, `or' acts as a short-circuit operator in GPC:  If the
     first operand is `True', the second operand is not evaluated
     because the result is already known to be `True'.  You can change
     this to complete evaluation using the `--no-short-circuit'
     command-line option or the `{$B+}' compiler directive.

  2. Bitwise "or" between two integer-type expressions.  The result is
     of the common integer type of both expressions.

  3. Use as a "procedure":  `operand1' is "or"ed bitwise with
     `operand2'; the result is stored in `operand1'.


Conforming to
-------------

   The logical `or' operator is defined in ISO-7185 Standard Pascal.

   According to ISO, you cannot rely on `or' being a short-circuit
operator. On the other hand, GPC's default behaviour does _not_
contradict the ISO standard. (See *Note or_else::.) However, since it
seems to be a de-facto standard among ISO Pascal compilers to evaluate
both operands of `or', GPC switches to `--no-short-circuit' mode if one
of the language dialect options selecting ISO Pascal, for instance
`--extended-pascal', is given. Use `--short-circuit' to override.

   Use of `or' as a bitwise operator for integers is a Borland Pascal
extension.

   Use of `or' as a "procedure" is a GNU Pascal extension.

Example
-------

     program OrDemo;
     var
       a, b, c: Integer;
     begin
       if (a = 0) or (b = 0) then  { logical `or' }
         c := 1
       else if a or b = 0 then  { bitwise `or' }
         c := 2
       else
         or (c, a)  { same as `c := c or a' }
     end.

   Note the difference between the logical `or' and the bitwise `or':
When `a' is 2 and `b' is 4, then `a or b' is 6. *Beware:* `a or b = 0'
happens to mean the same as `(a = 0) and (b = 0)'. (Note the `and'!)

   Since bitwise `or' has a higher priority than the `=' operator,
parentheses are needed in `if (a = 0) or (b = 0)' because otherwise `0
or b' would be calculated first, and the remainder would cause a parse
error.

See also
--------

   *Note and::, *Note xor::, *Note Operators::.


File: gpc.info,  Node: or else,  Next: Ord,  Prev: or,  Up: Reference

or else
=======

Synopsis
--------

     { `or else' is built in. A user-defined operator cannot consist of
        two words. }
     operator or else (operand1, operand2: Boolean) = Result: Boolean;

Description
-----------

   `or else' is an alias for the short-circuit logical operator
`or_else'.

Conforming to
-------------

   While `or_else' is defined in ISO-10206 Extended Pascal, `or else'
is a GNU Extension.

Example
-------

     program OrElseDemo;
     var
       a: Integer;
     begin
       ReadLn (a);
       if (a = 0) or else (100 div a > 42) then  { This is safe. }
         WriteLn ('100 div a > 42')
     end.

See also
--------

   *Note or_else::, *Note or::, *Note and then::.


File: gpc.info,  Node: Ord,  Next: or_else,  Prev: or else,  Up: Reference

Ord
===

   (Under construction.)

Synopsis
--------

     function Ord (Ch: Char): Integer;

Description
-----------

Conforming to
-------------

   `Ord' is defined in ISO-7185 Standard Pascal and supported by all
known Pascal variants.

Example
-------

See also
--------


File: gpc.info,  Node: or_else,  Next: otherwise,  Prev: Ord,  Up: Reference

or_else
=======

Synopsis
--------

     operator or_else (operand1, operand2: Boolean) = Result: Boolean;

Description
-----------

   The `or_else' short-circuit logical operator performs the same
operation as the logical operator `or'. But while the ISO standard does
not specify anything about the evaluation of the operands of `or' -
they may be evaluated in any order, or not at all - `or_else' has a
well-defined behaviour: It evaluates the first operand. If the result
is `True', `or_else' returns `True' without evaluating the second
operand. If it is `False', the second operand is evaluated and returned.

   GPC by default treats `or' and `or_else' exactly the same.  If you
want, for some reason, to have both operands of `or' evaluated
completely, you must assign both to temporary variables and then use
`or' - or `or_else', it does not matter.

Conforming to
-------------

   `or_else' is an ISO-10206 Extended Pascal extension.

   Some people think that the ISO standard requires both operands of
`or' to be evaluated. This is false. What the ISO standard _does_ say
is that you cannot rely on a certain order of evaluation of the
operands of `or'; in particular things like the following program can
crash according to ISO Pascal, although they cannot crash when compiled
with GNU Pascal running in default mode.

     program OrBug;
     var
       a: Integer;
     begin
       ReadLn (a);
       if (a = 0) or (100 div a > 42) then  { This is NOT safe! }
         WriteLn ('You''re lucky. But the test could have crashed...')
     end.

Example
-------

     program Or_ElseDemo;
     var
       a: Integer;
     begin
       ReadLn (a);
       if (a = 0) or_else (100 div a > 42) then  { This is safe. }
         WriteLn ('100 div a > 42')
     end.

See also
--------

   *Note or else::, *Note or::, *Note and_then::.


File: gpc.info,  Node: otherwise,  Next: Output,  Prev: or_else,  Up: Reference

otherwise
=========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Output,  Next: Override,  Prev: otherwise,  Up: Reference

Output
======

   (Under construction.)

Synopsis
--------

     var
       Output: Text;

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Override,  Next: Pack,  Prev: Output,  Up: Reference

Override
========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Pack,  Next: packed,  Prev: Override,  Up: Reference

Pack
====

   (Under construction.)

Synopsis
--------

Description
-----------

     procedure Pack (Source: UNPACKED ARRAY;
                     FirstElement: INDEX TYPE;
                     var Dest: PACKED ARRAY);

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: packed,  Next: Page,  Prev: Pack,  Up: Reference

packed
======

Synopsis
--------

Description
-----------

   `packed' is a reserved word. According to ISO-7185 Standard Pascal
it can precede `array' and `record' type definitions to indicate that
memory usage should be minimized for variables of this type, possibly
at the expense of loss of speed.

   As a GNU extension, `packed' can also be applied to *Note Subrange
Types::.

Conforming to
-------------

   The reserved word `packed' is defined in ISO-7185 Standard Pascal.

   According to ISO standard, only _packed_ arrays of char with lower
bound 1 qualify as strings of fixed length. GNU Pascal neither requires
`packed' nor the lower bound of 1 here.

Example
-------

     program PackedDemo;
     
     type
       MonthInt = packed 1 .. 12;  { needs one byte   }
       FastMonthInt = 1 .. 12;     { needs four bytes }
     
       FixString10 = packed array [1 .. 10] of Char;
       FoxyString10 = array [0 .. 9] of Char;
     
       Flags = packed array [1 .. 32] of Boolean;  { needs four Bytes }
     
       DateRec = packed record
         Day: 1 .. 31;       { five bits }
         Month: MonthInt;    { four bits }
         Year: Integer (15)  { 15 bits = -16384 .. 16383 }
       end;
     
       Dates = array [1 .. 1000] of DateRec;
     
     var
       S: FixString10;
       T: FoxyString10;
     
     begin
       S := 'Hello!';   { blank padded }
       WriteLn (S);
     
       T := 'GNU Pascal';  { GPC extension: this also works. }
       WriteLn (T)
     end.

   `DateRec' has 24 bits = 3 bytes in total; `Dates' has 3000 bytes.

See also
--------

   *Note Pack::, *Note Unpack::, *Note SizeOf::, *Note AlignOf::, *Note
BitSizeOf::.


File: gpc.info,  Node: Page,  Next: PAnsiChar,  Prev: packed,  Up: Reference

Page
====

   (Under construction.)

Synopsis
--------

     procedure Page (var F: Text);
   or
     procedure Page;

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: PAnsiChar,  Next: ParamCount,  Prev: Page,  Up: Reference

PAnsiChar
=========

   (Under construction.)

Synopsis
--------

     type
       PAnsiChar = ^AnsiChar;

Description
-----------

Conforming to
-------------

Example
-------

     program PAnsiCharDemo;
     var
       s: PAnsiChar;
     begin
       s := 'Hello, world!';
       {$X+}
       WriteLn (s)
     end.

See also
--------


File: gpc.info,  Node: ParamCount,  Next: ParamStr,  Prev: PAnsiChar,  Up: Reference

ParamCount
==========

Synopsis
--------

     function ParamCount: Integer;

Description
-----------

   `ParamCount' returns the number of command-line arguments given to
the program.  `ParamCount' returns 0 if no arguments have been given to
the program; the name of the program as an implicit argument is not
counted.

Conforming to
-------------

   `ParamCount' is a Borland Pascal extension.

Example
-------

     program ParamCountDemo;
     
     var
       i: Integer;
     
     begin
       WriteLn ('You have invoked this program with ',
                ParamCount, ' arguments.');
       WriteLn ('These are:');
       for i := 1 to ParamCount do
         WriteLn (ParamStr (i))
     end.

See also
--------

   *Note ParamStr::.


File: gpc.info,  Node: ParamStr,  Next: PChar,  Prev: ParamCount,  Up: Reference

ParamStr
========

   (Under construction.)

Synopsis
--------

     function ParamStr (ParmNumber: Integer): String;

Description
-----------

   *Note:* If you are using the Dos (DJGPP) or MS-Windows (mingw32)
version of GPC and are getting unexpected results from `ParamStr',
please see the section "Command-line Arguments Handling in DJGPP" of
the DJGPP FAQ list.

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: PChar,  Next: Pi,  Prev: ParamStr,  Up: Reference

PChar
=====

   (Under construction.)

Synopsis
--------

     type
       PChar = ^Char;
   or
     type
       PChar = CString;

Description
-----------

Conforming to
-------------

Example
-------

     program PCharDemo;
     var
       s: PChar;
     begin
       s := 'Hello, world!';
       {$X+}
       WriteLn (s)
     end.

See also
--------


File: gpc.info,  Node: Pi,  Next: Pointer,  Prev: PChar,  Up: Reference

Pi
==

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Pointer,  Next: Polar,  Prev: Pi,  Up: Reference

Pointer
=======

   (Under construction.)

Synopsis
--------

     type
       Pointer  { built-in type }

Description
-----------

Conforming to
-------------

Example
-------

     program PointerDemo;
     var
       a: Integer;
       b: Boolean;
       p: Pointer;
     begin
       p := nil;
       p := @a;
       p := @b
     end.

See also
--------


File: gpc.info,  Node: Polar,  Next: Pos,  Prev: Pointer,  Up: Reference

Polar
=====

   (Under construction.)

Synopsis
--------

     function Polar (rho, phi: Real): Complex;

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Pos,  Next: Position,  Prev: Polar,  Up: Reference

Pos
===

   (Under construction.)

Synopsis
--------

     function Pos (SearchPattern, Source: String): Integer;

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Position,  Next: pow,  Prev: Pos,  Up: Reference

Position
========

   (Under construction.)

Synopsis
--------

     function Position (var F: TYPED FILE);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: pow,  Next: Pred,  Prev: Position,  Up: Reference

pow
===

   (Under construction.)

Synopsis
--------

     operator pow (base: Real; exponent: Integer) = power: Real;
   or
     operator pow (base: Complex; exponent: Integer) = power: Complex;

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Pred,  Next: private,  Prev: pow,  Up: Reference

Pred
====

Synopsis
--------

     function Pred (i: ORDINAL TYPE): ORDINAL TYPE;
   or
     function Pred (i: ORDINAL TYPE; j: Integer): ORDINAL TYPE;

   or, with extended syntax (`--extended-syntax' or `{$X+}'),

     function Pred (p: POINTER TYPE): POINTER TYPE;
   or
     function Pred (p: POINTER TYPE; j: Integer): POINTER TYPE;

Description
-----------

   Returns the predecessor of the ORDINAL TYPE value `i', or, if the
second argument `j' is given, its `j'th predecessor.  For integer
values `i', this is `i - 1' (or `i - j').  (No, `Pred' does _not_ work
faster than plain subtraction.  Both are optimized to a single machine
instruction or even expanded by the compiler, if possible.)

   If extended syntax is on, the argument may also be a pointer value.
In this case, the address is decremented by the size of the variable
pointed to, or, if `j' is given, by `j' times the size of the variable
pointed to.  If `p' points to an element of an array, the returned
pointer will point to the (`j'th) previous element of the array.

Conforming to
-------------

   The `Pred' function is defined in ISO-7185 Standard Pascal.  The
optional second parameter is defined in ISO-10206 Extended Pascal.
Application of `Pred' to pointers is defined in Borland Pascal.  The
combination of the second argument with application to pointers is a
GNU extension.

Example
-------

     program PredDemo;
     
     type
       Metasyntactical = (foo, bar, baz);
     
     var
       m: Metasyntactical;
       c: Char;
       a: array [1 .. 7] of Integer;
       p: ^Integer;
     
     begin
       m := Pred (bar);     { foo }
       c := Pred ('Z', 2);  { 'X' }
       a [1] := 42;
       a [4] := Pred (a [1]);     { 41 }
       a [5] := Pred (a [4], 3);  { 38 }
       {$X+}
       p := @a [5];
       p := Pred (p);     { now p points to a [4] }
       p := Pred (p, 3);  { now p points to a [1] }
     end.

See also
--------

   *Note Succ::, *Note Dec::, *Note Pointer Arithmetics::.


File: gpc.info,  Node: private,  Next: procedure,  Prev: Pred,  Up: Reference

private
=======

   (Under construction.)

Synopsis
--------

Description
-----------

   GPC currently accepts but ignores the `private' directive in object
type declarations.

Conforming to
-------------

Example
-------

See also
--------

   *Note protected::, *Note public::, *Note published::.


File: gpc.info,  Node: procedure,  Next: program,  Prev: private,  Up: Reference

procedure
=========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: program,  Next: property,  Prev: procedure,  Up: Reference

program
=======

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: property,  Next: protected,  Prev: program,  Up: Reference

property
========

   Not yet implemented.

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: protected,  Next: PtrCard,  Prev: property,  Up: Reference

protected
=========

   (Under construction.)

Synopsis
--------

Description
-----------

   The Extended Pascal meaning of `protected' is supported by GPC.

   GPC currently accepts but ignores the `protected' directive in
object type declarations.

Conforming to
-------------

   Extended Pascal and Borland Pascal, but with different meanings.

Example
-------

See also
--------

   *Note const::, *Note import::, *Note private::, *Note public::,
*Note published::.


File: gpc.info,  Node: PtrCard,  Next: PtrDiffType,  Prev: protected,  Up: Reference

PtrCard
=======

   (Under construction.)

Synopsis
--------

     type
       PtrCard = Cardinal (BitSizeOf (Pointer));

Description
-----------

Conforming to
-------------

Example
-------

     program PtrCardDemo;
     var
       a: PtrCard;
       p: Pointer;
     begin
       New (p);
       a := PtrCard (p);
       Inc (a);
       p := Pointer (a)
     end.

See also
--------


File: gpc.info,  Node: PtrDiffType,  Next: PtrInt,  Prev: PtrCard,  Up: Reference

PtrDiffType
===========

   (Under construction.)

Synopsis
--------

     type
       PtrDiffType  { built-in type }

Description
-----------

Conforming to
-------------

Example
-------

     program PtrDiffTypeDemo;
     var
       a: array [1 .. 10] of Integer;
       d: PtrDiffType;
       p, q: Pointer;
     begin
       p := @a [1];
       q := @a [4];
       {$X+}
       d := q - p
     end.

See also
--------


File: gpc.info,  Node: PtrInt,  Next: PtrWord,  Prev: PtrDiffType,  Up: Reference

PtrInt
======

   (Under construction.)

Synopsis
--------

     type
       PtrCard = Integer (BitSizeOf (Pointer));

Description
-----------

Conforming to
-------------

Example
-------

     program PtrIntDemo;
     var
       a: PtrInt;
       p: Pointer;
     begin
       New (p);
       a := PtrInt (p);
       Inc (a);
       p := Pointer (a)
     end.

See also
--------


File: gpc.info,  Node: PtrWord,  Next: public,  Prev: PtrInt,  Up: Reference

PtrWord
=======

   (Under construction.)

Synopsis
--------

     type
       PtrWord = PtrCard;

Description
-----------

Conforming to
-------------

Example
-------

     program PtrWordDemo;
     var
       a: PtrWord;
       p: Pointer;
     begin
       New (p);
       a := PtrWord (p);
       Inc (a);
       p := Pointer (a)
     end.

See also
--------


File: gpc.info,  Node: public,  Next: published,  Prev: PtrWord,  Up: Reference

public
======

   (Under construction.)

Synopsis
--------

Description
-----------

   GPC currently accepts but ignores the `public' directive in object
type declarations.

Conforming to
-------------

Example
-------

See also
--------

   *Note private::, *Note protected::, *Note published::.


File: gpc.info,  Node: published,  Next: Put,  Prev: public,  Up: Reference

published
=========

   (Under construction.)

Synopsis
--------

Description
-----------

   GPC currently accepts but ignores the `published' directive in
object type declarations.

Conforming to
-------------

Example
-------

See also
--------

   *Note private::, *Note protected::, *Note public::.


File: gpc.info,  Node: Put,  Next: qualified,  Prev: published,  Up: Reference

Put
===

   (Under construction.)

Synopsis
--------

     procedure Put (var F: TYPED FILE);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: qualified,  Next: Random,  Prev: Put,  Up: Reference

qualified
=========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Random,  Next: Randomize,  Prev: qualified,  Up: Reference

Random
======

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Randomize,  Next: Re,  Prev: Random,  Up: Reference

Randomize
=========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Re,  Next: Read,  Prev: Randomize,  Up: Reference

Re
==

Synopsis
--------

     function Re (z: Complex): Real;

Description
-----------

   `Re' extracts the real part of the complex number `z'.

Conforming to
-------------

   `Re' is an ISO-10206 Extended Pascal extension.

Example
-------

     program ReDemo;
     var
       z: Complex;
     begin
       z := Cmplx (1, 2);
       WriteLn (Re (z) : 0 : 5)
     end.

See also
--------

   *Note Cmplx::, *Note Im::, *Note Arg::


File: gpc.info,  Node: Read,  Next: ReadLn,  Prev: Re,  Up: Reference

Read
====

   (Under construction.)

Synopsis
--------

     procedure Read (var F: TYPED FILE; VARIABLE);
   or
     procedure Read (var F: Text; VARIABLES);
   or
     procedure Read (VARIABLES);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: ReadLn,  Next: ReadStr,  Prev: Read,  Up: Reference

ReadLn
======

   (Under construction.)

Synopsis
--------

     procedure ReadLn (var F: Text; VARIABLES);
   or
     procedure ReadLn (VARIABLES);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: ReadStr,  Next: Real,  Prev: ReadLn,  Up: Reference

ReadStr
=======

   (Under construction.)

Synopsis
--------

     procedure ReadStr (const S: String; VARIABLES);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Real,  Next: record,  Prev: ReadStr,  Up: Reference

Real
====

   (Under construction.)

Synopsis
--------

     type
       Real  { built-in type }

Description
-----------

Conforming to
-------------

Example
-------

     program RealDemo;
     var
       a: Real;
     begin
       a := 42;
       WriteLn (a)
     end.

See also
--------


File: gpc.info,  Node: record,  Next: register,  Prev: Real,  Up: Reference

record
======

Synopsis
--------

   In type definitions:
     RECORD TYPE IDENTIFIER = record
       FIELD IDENTIFIER : TYPE DEFINITION
       ...
       FIELD IDENTIFIER : TYPE DEFINITION
     end;

   or, with a variant part,

     RECORD TYPE IDENTIFIER = record
       FIELD IDENTIFIER : TYPE DEFINITION
       ...
       FIELD IDENTIFIER : TYPE DEFINITION
       case bar: VARIANT TYPE of
         SELECTOR: (FIELD DECLARATIONS);
         SELECTOR: (FIELD DECLARATIONS);
         ...
     end;

   or, without a variant selector field,

     RECORD TYPE IDENTIFIER = record
       FIELD IDENTIFIER : TYPE DEFINITION
       ...
       FIELD IDENTIFIER : TYPE DEFINITION
       case VARIANT TYPE of
         SELECTOR: (FIELD DECLARATIONS);
         SELECTOR: (FIELD DECLARATIONS);
         ...
     end;

Description
-----------

   The reserved word `record' starts the definition of a new record
type.

   Records can be `packed' to save memory usage at the expense of speed.

   The variants of a variant record may - but are not required to -
share one location in memory (inside the record).

   Sometimes variant records are used to emulate type casting in
ISO-7185 Standard Pascal. This is in fact a violation of the standard
and not portable. There is intentionally _no_ possibility in ISO-7185
Standard Pascal to emulate type casting.

Conforming to
-------------

   The reserved word `record' and record types are defined in ISO-7185
Standard Pascal.

   According to ISO Pascal, the variant type must be an identifier.
GNU Pascal, like UCSD and Borland Pascal, also allows a subrange here.

   Subranges in the variant fields, e.g. `case Integer of 2 .. 5', are
a GPC extension.

Example
-------

     program RecordDemo;
     
     type
       FooPtr = ^Foo;
     
       Foo = record
         Bar: Integer;
         NextFoo: fooPtr;
         case Choice: 1 .. 3 of
           1: (a: Integer);  { These three choices may share }
           2: (b: Real);     { one location in memory. }
           3: (c: Char;
               d: Boolean);
       end;
     
       SmallFoo = packed record
         b: 0 .. 3;
         a: Integer (5);
         r: Boolean
       end;  { needs 1 byte }
     
     var
       f: Foo;
     
     begin
       f.b := 3.14;
       WriteLn (f.a)  { yields some strange number which is part of the   }
                      { internal representation of the real number `f.b'. }
     end.

See also
--------

   *Note packed::, *Note case Statement::


File: gpc.info,  Node: register,  Next: Release,  Prev: record,  Up: Reference

register
========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Release,  Next: Rename,  Prev: register,  Up: Reference

Release
=======

   (Under construction.)

Synopsis
--------

     procedure Release (P: Pointer);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Rename,  Next: repeat,  Prev: Release,  Up: Reference

Rename
======

   (Under construction.)

Synopsis
--------

     procedure Rename (var F: ANY FILE; NewName: String);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: repeat,  Next: Reset,  Prev: Rename,  Up: Reference

repeat
======

Synopsis
--------

     repeat
       STATEMENT;
       ...
       STATEMENT;
     until BOOLEAN EXPRESSION;

Description
-----------

   The `repeat ... until' statement declares a loop.  For further
description see *Note repeat Statement::.

Conforming to
-------------

   `repeat' is defined in ISO-7185 Standard Pascal and supported by all
known Pascal variants.

Example
-------

     program RepeatDemo;
     var
       Number, Sum: Integer;
     begin
       WriteLn ('Black Jack for beginners.');
       WriteLn ('You can choose your cards yourself. :-)');
       Sum := 0;
       repeat
         Write ('Your card? ');
         ReadLn (Number);
         Inc (Sum, Number);
         WriteLn ('You have ', Sum, '.')
       until Sum >= 21;
       if Sum = 21 then
         WriteLn ('You win!')
       else
         WriteLn ('You lose.')
     end.

See also
--------

   *Note while Statement::, *Note for Statement::


File: gpc.info,  Node: Reset,  Next: resident,  Prev: repeat,  Up: Reference

Reset
=====

   (Under construction.)

Synopsis
--------

     procedure Reset (var F: ANY FILE);
   or
     procedure Reset (var F: ANY FILE; FileName: String);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: resident,  Next: restricted,  Prev: Reset,  Up: Reference

resident
========

   Not yet implemented.

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: restricted,  Next: Result,  Prev: resident,  Up: Reference

restricted
==========

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Result,  Next: Return,  Prev: restricted,  Up: Reference

Result
======

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Return,  Next: ReturnAddress,  Prev: Result,  Up: Reference

Return
======

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: ReturnAddress,  Next: Rewrite,  Prev: Return,  Up: Reference

ReturnAddress
=============

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Rewrite,  Next: RmDir,  Prev: ReturnAddress,  Up: Reference

Rewrite
=======

   (Under construction.)

Synopsis
--------

     procedure Rewrite (var F: ANY FILE);
   or
     procedure Rewrite (var F: ANY FILE; FileName: String);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: RmDir,  Next: Root,  Prev: Rewrite,  Up: Reference

RmDir
=====

Synopsis
--------

     procedure RmDir (Directory: String);

Description
-----------

   `RmDir' removes the given DIRECTORY if its argument is a valid
parameter to the related operating system's function. Otherwise a
runtime error is caused.

Conforming to
-------------

   `RmDir' is a Borland Pascal extension.

Example
-------

     program RmDirDemo;
     var
       Foo: String (127);
     begin
       WriteLn ('Enter directory name to remove: ');
       ReadLn (Foo);
       {$i-}                     { Suppress exit on error }
       RmDir (Foo);
       if IOResult <> 0 then
         WriteLn ('Directory ', foo, ' could not be removed.')
       else
         WriteLn ('Okay.')
     end.

See also
--------

   *Note ChDir::, *Note MkDir::


File: gpc.info,  Node: Root,  Next: Round,  Prev: RmDir,  Up: Reference

Root
====

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Round,  Next: RunError,  Prev: Root,  Up: Reference

Round
=====

Synopsis
--------

     function Round (x: Real): Integer;

Description
-----------

   `Round' returns the nearest integer to `x'. The result is of type
integer. In the case of equidistance, the result is machine-dependent
(or depends on the behaviour of the processor).

Conforming to
-------------

   `Round' is defined in ISO-7185 Standard Pascal and supported by all
known Pascal variants.

Example
-------

     program RoundDemo;
     var
       Foo: Real;
     begin
       foo := 9.876543;
       WriteLn (Round (Foo));  { Prints 10 }
       foo := 3.456789;
       WriteLn (Round (Foo))   { Prints 3 }
     end.

See also
--------

   *Note Round::


File: gpc.info,  Node: RunError,  Next: Seek,  Prev: Round,  Up: Reference

RunError
========

   (Under construction.)

Synopsis
--------

     procedure RunError (ErrorCode: Integer);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Seek,  Next: SeekRead,  Prev: RunError,  Up: Reference

Seek
====

   (Under construction.)

Synopsis
--------

     procedure Seek (var F: TYPED FILE; NewPosition: Integer);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: SeekRead,  Next: SeekUpdate,  Prev: Seek,  Up: Reference

SeekRead
========

   (Under construction.)

Synopsis
--------

     procedure SeekRead (var F: TYPED FILE; NewPosition: Integer);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: SeekUpdate,  Next: SeekWrite,  Prev: SeekRead,  Up: Reference

SeekUpdate
==========

   (Under construction.)

Synopsis
--------

     procedure SeekUpdate (var F: TYPED FILE; NewPosition: Integer);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: SeekWrite,  Next: segment,  Prev: SeekUpdate,  Up: Reference

SeekWrite
=========

   (Under construction.)

Synopsis
--------

     procedure SeekWrite (var F: TYPED FILE; NewPosition: Integer);

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: segment,  Next: Self,  Prev: SeekWrite,  Up: Reference

segment
=======

   Not yet implemented.

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: Self,  Next: set,  Prev: segment,  Up: Reference

Self
====

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: set,  Next: SetFileTime,  Prev: Self,  Up: Reference

set
===

   (Under construction.)

Synopsis
--------

   In type definitions:
     set of TYPE  { built-in type class }

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: SetFileTime,  Next: SetLength,  Prev: set,  Up: Reference

SetFileTime
===========

     procedure SetFileTime (var f : ANY FILE;
                            AccessTime, ModificationTime : UnixTimeType);

Synopsis
--------

Description
-----------

Conforming to
-------------

   `SetFileTime' is a GNU extension.

Example
-------

See also
--------


File: gpc.info,  Node: SetLength,  Next: SetType,  Prev: SetFileTime,  Up: Reference

SetLength
=========

Synopsis
--------

     procedure SetLength (var S: String; NewLength: Integer);

Description
-----------

   `SetLength' explicitly assigns a new length `NewLength' to the
string parameter `S'.  The contents of the string is _not_ changed; if
the operation increases the length of the string, the characters
appended at the end are _undefined_.

   If you want to use `SetLength', please enable "extended syntax"
(`--extended-syntax' or `{$X+}').

Conforming to
-------------

   `SetLength' is a Borland Delphi 2.0 extension.

Example
-------

     program SetLengthDemo;
     
     {$X+}  { Enable "dangerous" features }
     
     var
       S : String (26);
     
     begin
       S := 'Hello, world!';
       SetLength (S, Length ('Hello'));
       WriteLn (S);                                     { 'Hello' }
       SetLength (S, 26);
       WriteLn (S);               { 'Hello, world!(%$xy"!#&~+(/]' }
                           { undefined characters ^^^^^^^^^^^^^^  }
     
       SetLength (S, 42);  { The overflow is *not* (yet) detected }
       WriteLn (S);        { This might cause a runtime error.    }
     end.

See also
--------

   *Note Length::, *Note String::, *Note SetType::.


File: gpc.info,  Node: SetType,  Next: shl,  Prev: SetLength,  Up: Reference

SetType
=======

Synopsis
--------

     procedure SetType (var SomeObject; VMT: Pointer);

Description
-----------

   The procedure `SetType' explicitly assigns a value to the implicit
VMT field of an object.  This is normally done implicitly when a
constructor is called.

   You can use this to write a polymorphic I/O routine which reads an
object from a file.  In this case, you cannot reasonably use `New' to
allocate the storage, but you `GetMem' it and initialize the object
manually using `SetType' before calling the constructor explicitly.

   This is a dangerous feature which yields a warning unless `{$X+}' is
given.

Conforming to
-------------

   `SetType' is a GNU extension.

Example
-------

     program SetTypeDemo;
     
     type
       BasePtr = ^BaseObj;
     
       BaseObj = object
         constructor Load;
       end;
     
       ChildObj = object (BaseObj)
         constructor Load;
       end;
     
     constructor BaseObj.Load;
     begin
     end;
     
     constructor ChildObj.Load;
     begin
     end;
     
     {$X+}
     
     { This is somewhat fragmentary code. }
     function GetObject (var InputFile: File) = Result: BasePtr;
     const
       VMTTable: array [1 .. 2] of Pointer =
         (TypeOf (BaseObj), TypeOf (ChildObj));
     var
       Size: Cardinal;
       TypeID: Integer;
       VMT: Pointer;
     begin
       { Read the size of the object from some file and store it in `Size'. }
       BlockRead (InputFile, Size, SizeOf (Size));
     
       { Allocate memory for the object. }
       GetMem (Result, Size);
     
       { Read some ID from some file. }
       BlockRead (InputFile, TypeID, SizeOf (TypeID));
     
       { Look up the `VMT' from some table. }
       { Range checking wouldn't be a bad idea here... }
       VMT := VMTTable [TypeID];
     
       SetType (Result^, VMT);
     
       { Now the object is ready, and the constructor can be called. }
       { Look up the correct constructor from some table and call it. }
     end;
     
     begin
     end.

See also
--------

   *Note TypeOf::, *Note OOP::.


File: gpc.info,  Node: shl,  Next: ShortBool,  Prev: SetType,  Up: Reference

shl
===

Synopsis
--------

     operator shl (operand1, operand2: INTEGER TYPE) = Result: INTEGER TYPE;
   or
     procedure shl (var operand1: INTEGER TYPE; operand2: INTEGER TYPE);

Description
-----------

   In GNU Pascal, `shl' has two built-in meanings:

  1. Bitwise shift left of an integer-type expression by another
     integer value.  The result is of the type of the first operand.

  2. Use as a "procedure":  `operand1' is shifted left by `operand2';
     the result is stored in `operand1'.


Conforming to
-------------

   `shl' is a Borland Pascal extension.

   Use of `shl' as a "procedure" is a GNU Pascal extension.

Example
-------

     program ShlDemo;
     var
       a: Integer;
     begin
       a := 1 shl 7;  { yields 128 = 2 pow 7 }
       shl (a, 4)  { same as `a := a shl 4' }
     end.

See also
--------

   *Note shr::, *Note Operators::.


File: gpc.info,  Node: ShortBool,  Next: ShortCard,  Prev: shl,  Up: Reference

ShortBool
=========

   (Under construction.)

Synopsis
--------

     type
       ShortBool = Boolean (BitSizeOf (ShortInt));

Description
-----------

Conforming to
-------------

Example
-------

     program ShortBoolDemo;
     var
       a: ShortBool;
     begin
       ShortInt (a) := 1;
       if a then WriteLn ('Ord (True) = 1')
     end.

See also
--------


File: gpc.info,  Node: ShortCard,  Next: ShortInt,  Prev: ShortBool,  Up: Reference

ShortCard
=========

Synopsis
--------

     type
       ShortCard = Cardinal (BitSizeOf (ShortInt));

Description
-----------

   `ShortCard' is an unsigned integer type which is not larger than
`Cardinal'.  On most platforms it is 16 bits wide and thus has a range
of `0..65535'.

   `ShortCard' in GNU Pascal is compatible to `short unsigned int' in
GNU C.

   There are lots of other integer types in GPC, see *Note Integer
Types::.

Conforming to
-------------

   `ShortCard' is a GNU Pascal extension.

Example
-------

     program ShortCardDemo;
     var
       a: ShortCard;
     begin
       a := 42;
       WriteLn (a)
     end.

See also
--------

   *Note Integer Types::, *Note Subrange Types::.


File: gpc.info,  Node: ShortInt,  Next: ShortReal,  Prev: ShortCard,  Up: Reference

ShortInt
========

Synopsis
--------

     type
       ShortInt  { built-in type }

Description
-----------

   `ShortInt' is a signed integer type which is not larger than
`Integer'.  On most platforms it is 16 bits wide and thus has a range
of `-32768..32767'.

   `ShortInt' in GNU Pascal is compatible to `short int' in GNU C.

   There are lots of other integer types in GPC, see *Note Integer
Types::.

Conforming to
-------------

   `ShortInt' is a Borland Pascal extension. In Borland Pascal,
`ShortInt' is an 8-bit signed integer type (`ByteInt' in GNU Pascal).

Example
-------

     program ShortIntDemo;
     var
       a: ShortInt;
     begin
       a := 42;
       WriteLn (a)
     end.

See also
--------

   *Note Integer Types::, *Note Subrange Types::.


File: gpc.info,  Node: ShortReal,  Next: ShortWord,  Prev: ShortInt,  Up: Reference

ShortReal
=========

   (Under construction.)

Synopsis
--------

     type
       ShortReal  { built-in type }

Description
-----------

Conforming to
-------------

Example
-------

     program ShortRealDemo;
     var
       a: ShortReal;
     begin
       a := 42;
       WriteLn (a)
     end.

See also
--------


File: gpc.info,  Node: ShortWord,  Next: shr,  Prev: ShortReal,  Up: Reference

ShortWord
=========

Synopsis
--------

     type
       ShortWord = ShortCard;

Description
-----------

   `ShortWord' is an unsigned integer type which is not larger than
`Word'.  On most platforms it is 16 bits wide and thus has a range of
of `0..65535'.  It is the same as *Note ShortCard::.

   `ShortWord' in GNU Pascal is compatible to `short unsigned int' in
GNU C.

   There are lots of other integer types in GPC, see *Note Integer
Types::.

Conforming to
-------------

   `ShortWord' is a GNU Pascal extension.

   `ShortWord' in GNU Pascal essentially corresponds to `Word' in
Borland Pascal and Delphi where it is a 16-bit unsigned integer type.

Example
-------

     program ShortWordDemo;
     var
       a: ShortWord;
     begin
       a := 42;
       WriteLn (a)
     end.

See also
--------

   *Note Integer Types::, *Note Subrange Types::.


File: gpc.info,  Node: shr,  Next: Sin,  Prev: ShortWord,  Up: Reference

shr
===

Synopsis
--------

     operator shr (operand1, operand2: INTEGER TYPE) = Result: INTEGER TYPE;
   or
     procedure shr (var operand1: INTEGER TYPE; operand2: INTEGER TYPE);

Description
-----------

   In GNU Pascal, `shr' has two built-in meanings:

  1. Bitwise shift right of an integer-type expression by another
     integer value.  The result is of the type of the first operand.

  2. Use as a "procedure":  `operand1' is shifted right by `operand2';
     the result is stored in `operand1'.


Conforming to
-------------

   `shr' is a Borland Pascal extension.

   Unlike the Borland compilers, GNU Pascal cares about the signedness
of the first operand:  If a signed integer with a negative value is
shifted right, "one" bits are filled in from the left.

   Use of `shr' as a "procedure" is a GNU Pascal extension.

Example
-------

     program ShrDemo;
     var
       a: Integer;
     begin
       a := 1024 shr 4;  { yields 64 }
       a := -127 shr 4;  { yields -8 }
       shr (a, 2)  { same as `a := a shr 2' }
     end.

See also
--------

   *Note shl::, *Note Operators::.


File: gpc.info,  Node: Sin,  Next: Single,  Prev: shr,  Up: Reference

Sin
===

Synopsis
--------

     function Sin (x: Real): Real;
   or
     function Sin (z: Complex): Complex;

Description
-----------

   `Sin' returns the sine of the argument.  The result is in the range
`-1 <= Sin (x) <= 1' for real arguments.

Conforming to
-------------

   The function `Sin' is defined in ISO-7185 Standard Pascal; its
application to complex values is defined in ISO-10206 Extended Pascal.

Example
-------

     program SinDemo;
     begin
       WriteLn (Sin (SqRt (2) / 2) : 0 : 5)
       { yields 0.5 since Sin (SqRt (2) /2) = 0.5 }
     end.

See also
--------

   *Note ArcTan::, *Note Cos::, *Note Ln::, *Note Arg::.


File: gpc.info,  Node: Single,  Next: SizeOf,  Prev: Sin,  Up: Reference

Single
======

   (Under construction.)

Synopsis
--------

     type
       Single = ShortReal;

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: SizeOf,  Next: SizeType,  Prev: Single,  Up: Reference

SizeOf
======

Synopsis
--------

     function SizeOf (var x): SizeType;

Description
-----------

   Returns the size of a type or variable in bytes.

Conforming to
-------------

   `SizeOf' is an UCSD Pascal extension.

Example
-------

     program SizeOfDemo;
     var
       a: Integer;
       b: array [1 .. 8] of Char;
     begin
       WriteLn (SizeOf (a));  { Size of an `Integer'; often 4 bytes. }
       WriteLn (SizeOf (b))   { Size of eight `Char's; usually 8 bytes. }
     end.

See also
--------

   *Note BitSizeOf::, *Note AlignOf::, *Note TypeOf::.


File: gpc.info,  Node: SizeType,  Next: SmallInt,  Prev: SizeOf,  Up: Reference

SizeType
========

   (Under construction.)

Synopsis
--------

     type
       SizeType  { built-in type }

Description
-----------

Conforming to
-------------

Example
-------

     program SizeTypeDemo;
     var
       a: array [1 .. 10] of Integer;
       Size: SizeType;
     begin
       Size := SizeOf (a);
       WriteLn (Size)
     end.

See also
--------


File: gpc.info,  Node: SmallInt,  Next: Sqr,  Prev: SizeType,  Up: Reference

SmallInt
========

Synopsis
--------

     type
       SmallInt = ShortInt;

Description
-----------

   `SmallInt' is a signed integer type which is not larger than
`Integer'. On most platforms it is 16 bits wide and thus has a range of
`-32768..32767'. It is the same as `ShortInt' (see *Note ShortInt::).

   There are lots of other integer types in GPC, see *Note Integer
Types::.

Conforming to
-------------

   `SmallInt' is a Delphi 2.0 extension.

Example
-------

     program SmallIntDemo;
     var
       a: SmallInt;
     begin
       a := 42;
       WriteLn (a)
     end.

See also
--------

   *Note ShortInt::, *Note Integer Types::, *Note Subrange Types::.


File: gpc.info,  Node: Sqr,  Next: SqRt,  Prev: SmallInt,  Up: Reference

Sqr
===

Synopsis
--------

     function Sqr (i: INTEGER TYPE): INTEGER TYPE;
   or
     function Sqr (x: REAL TYPE): REAL TYPE;
   or
     function Sqr (z: COMPLEX TYPE): COMPLEX TYPE;

Description
-----------

   Returns the square of the argument:

     function Sqr (x: SOME TYPE): SOME TYPE;
     begin
       Sqr := x * x  { or: x pow 2 }
     end;

Conforming to
-------------

   The function `Sqr' is defined in ISO-7185 Standard Pascal; its
application to complex values is defined in ISO-10206 Extended Pascal.

Example
-------

     program SqrDemo;
     
     var
       i: Complex;
     
     begin
       i := Cmplx (0, 1);
       WriteLn (Re (Sqr (i)) : 0 : 3)  { yields -1.000 }
     end.

See also
--------

   *Note pow::, *Note SqRt::, *Note Abs::, *Note Operators::.


File: gpc.info,  Node: SqRt,  Next: StandardError,  Prev: Sqr,  Up: Reference

SqRt
====

Synopsis
--------

     function SqRt (x: REAL TYPE): REAL TYPE;
   or
     function SqRt (z: COMPLEX TYPE): COMPLEX TYPE;

Description
-----------

   Returns the positive square root of the argument.

   For real arguments, it is an error if the argument is negative.

   For complex arguments, `SqRt' returns the principal value of the
root of the argument, i.e. the root with positive real part, or, if the
real part is zero, that one with positive imaginary part.

Conforming to
-------------

   The function `SqRt' is defined in ISO-7185 Standard Pascal; its
application to complex values is defined in ISO-10206 Extended Pascal.

Example
-------

     program SqRtDemo;
     
     var
       m1: Complex;
     
     begin
       m1 := Cmplx (-1, 0);  { -1 }
       WriteLn (Re (SqRt (m1)) : 6 : 3, Im (SqRt (m1)) : 6 : 3);
         { yields 1.000 -1.000, i.e. the imaginary unit, i }
     end.

See also
--------

   *Note pow::, *Note Sqr::, *Note Operators::.


File: gpc.info,  Node: StandardError,  Next: StandardInput,  Prev: SqRt,  Up: Reference

StandardError
=============

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: StandardInput,  Next: StandardOutput,  Prev: StandardError,  Up: Reference

StandardInput
=============

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: StandardOutput,  Next: static,  Prev: StandardInput,  Up: Reference

StandardOutput
==============

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------


File: gpc.info,  Node: static,  Next: StdErr,  Prev: StandardOutput,  Up: Reference

static
======

   (Under construction.)

Synopsis
--------

Description
-----------

Conforming to
-------------

Example
-------

See also
--------

