next up previous contents index
Weiter: A.2 Das Paket Hinauf: A Vordefinierte Pakete Zurück: A Vordefinierte Pakete

A.1 Das Paket Standard

 


package Standard is
pragma Pure(Standard);

type Boolean is (False, True);

-Thepredefinedrelationaloperatorsforthistypeareasfollows:

-function''=''(Left,Right:Boolean)returnBoolean;
-function''/=''(Left,Right:Boolean)returnBoolean;
-function''<''(Left,Right:Boolean)returnBoolean;
-function''<=''(Left,Right:Boolean)returnBoolean;
-function''>''(Left,Right:Boolean)returnBoolean;
-function''>=''(Left,Right:Boolean)returnBoolean;

-Thepredefinedlogicaloperatorsandthepredefinedlogical
-negationoperatorareasfollows:

-function''and''(Left,Right:Boolean)returnBoolean;
-function''or''(Left,Right:Boolean)returnBoolean;
-function''xor''(Left,Right:Boolean)returnBoolean;

-function''not''(Right:Boolean)returnBoolean;

-Theintegertyperoot_integerispredefined.
-Thecorrespondinguniversaltypeisuniversal_integer.

type Integer is range implementation-defined;

subtype Natural is Integer range 0 .. Integer'Last;
subtype Positive is Integer range 1 .. Integer'Last;

-ThepredefinedoperatorsfortypeIntegerareasfollows:


-function''=''(Left,Right:Integer'Base)returnBoolean;
-function''/=''(Left,Right:Integer'Base)returnBoolean;
-function''<''(Left,Right:Integer'Base)returnBoolean;
-function''<=''(Left,Right:Integer'Base)returnBoolean;
-function''>''(Left,Right:Integer'Base)returnBoolean;
-function''>=''(Left,Right:Integer'Base)returnBoolean;

-function''+''(Right:Integer'Base)returnInteger'Base;
-function''-''(Right:Integer'Base)returnInteger'Base;
-function''abs''(Right:Integer'Base)returnInteger'Base;

-function''+''(Left,Right:Integer'Base)returnInteger'Base;
-function''-''(Left,Right:Integer'Base)returnInteger'Base;
-function''''(Left,Right:Integer'Base)returnInteger'Base;
-function''/''(Left,Right:Integer'Base)returnInteger'Base;
-function''rem''(Left,Right:Integer'Base)returnInteger'Base;
-function''mod''(Left,Right:Integer'Base)returnInteger'Base;

-function''''(Left:Integer'Base;Right:Natural)returnInteger'Base;

-Thespecificationofeachoperatorforthetype
-root_integer,orforanyadditionalpredefinedinteger
-type,isobtainedbyreplacingIntegerbythenameofthetype
-inthespecificationofthecorrespondingoperatorofthetype
-Integer.Therightoperandoftheexponentiatingoperator
-remainsassubtypeNatural.

-Thefloatingpointtyperoot_realispredefined.
-Thecorrespondinguniversaltypeisuniversal_real.

type Float is digits implementation-defined;

-Thepredefinedoperatorsforthistypeareasfollows:

-function''=''(Left,Right:Float)returnBoolean;
-function''/=''(Left,Right:Float)returnBoolean;
-function''<''(Left,Right:Float)returnBoolean;
-function''<=''(Left,Right:Float)returnBoolean;
-function''>''(Left,Right:Float)returnBoolean;
-function''>=''(Left,Right:Float)returnBoolean;

-function''+''(Right:Float)returnFloat;
-function''-''(Right:Float)returnFloat;
-function''abs''(Right:Float)returnFloat;

-function''+''(Left,Right:Float)returnFloat;
-function''-''(Left,Right:Float)returnFloat;
-function''''(Left,Right:Float)returnFloat;
-function''/''(Left,Right:Float)returnFloat;
-function''''(Left:Float;Right:Integer'Base)returnFloat;

-Thespecificationofeachoperatorforthetyperoot_real,orfor
-anyadditionalpredefinedfloatingpointtype,isobtainedby
-replacingFloatbythenameofthetypeinthespecificationofthe
-correspondingoperatorofthetypeFloat.

-Inaddition,thefollowingoperatorsarepredefinedfortheroot
-numerictypes:

function "" (Left : root_integer; Right : root_real)
return root_real;

function "" (Left : root_real; Right : root_integer)
return root_real;

function "/" (Left : root_real; Right : root_integer)
return root_real;

-Thetypeuniversal_fixedispredefined.
-Theonlymultiplyingoperatorsdefinedbetween
-fixedpointtypesare

function "" (Left : universal_fixed; Right : universal_fixed)
return universal_fixed;

function "/" (Left : universal_fixed; Right : universal_fixed)
return universal_fixed;



-ThedeclarationoftypeCharacterisbasedonthestandard
-ISOcharacterset.
-Therearenocharacterliteralscorrespondingtothepositions
-forcontrolcharacters.
-Theyareindicatedinitalicsinthisdefinition.See

type Character is

(nul, soh, stx, etx, eot, enq, ack, bel,
bs, ht, lf, vt, ff, cr, so, si,

dle, dc1, dc2, dc3, dc4, nak, syn, etb,
can, em, sub, esc, fs, gs, rs, us,

' ', '!', '''', '#', '', '%', '&', ''',
'(', ')', '', '+', ',', '-', '.', '/',

'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=', '>', '?',

'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',

'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
', '', '_',

'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',

'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', '{', '', '}', '', del,

reserved_128, reserved_129, reserved_130, reserved_131,
ind, nel, ssa, esa,
hts, htj, vts, pld, plu, ri, ss2, ss3,

dcs, pu1, pu2, sts, cch, mw, spa, epa,
reserved_152, reserved_153, reserved_154, csi, st,
osc, pm, apc, ... );


- The predefined operators for the type Character are the same as for
- any enumeration type.



- The declaration of type Wide_Character is based on the standard
- ISO 10646 BMP character set.
- The first 256 positions have the same contents as type Character.
- See 3.5.2.

type Wide_Character is (nul, soh ... FFFE, FFFF);



package ASCII is ... end ASCII; -Obsolescent; see I.5



- Predefined string types:

type String is array(Positive range <

>$) of Character;
pragma Pack(String);

- The predefined operators for this type are as follows:

- function verbmark>159verbmark>=verbmark>160verbmark> (Left, Right: String) return Boolean;
- function verbmark>161verbmark>$≠$verbmark>162verbmark> (Left, Right: String) return Boolean;
- function verbmark>163verbmark>$<$verbmark>164verbmark> (Left, Right: String) return Boolean;
- function verbmark>165verbmark>$≤$verbmark>166verbmark> (Left, Right: String) return Boolean;
- function verbmark>167verbmark>$>$verbmark>168verbmark> (Left, Right: String) return Boolean;
- function verbmark>169verbmark>$≥$verbmark>170verbmark> (Left, Right: String) return Boolean;

- function verbmark>171verbmark>&verbmark>172verbmark> (Left: String; Right: String) return String;
- function verbmark>173verbmark>&verbmark>174verbmark> (Left: Character; Right: String) return String;
- function verbmark>175verbmark>&verbmark>176verbmark> (Left: String; Right: Character) return String;
- function verbmark>177verbmark>&verbmark>178verbmark> (Left: Character; Right: Character) return String;

type Wide_String is array(Positive range $<

>) of Wide_Character;
pragma Pack(Wide_String);

- The predefined operators for this type correspond to those for String

type Duration is delta implementation-defined range implementation-defined;

- The predefined operators for the type Duration are the same as for
- any fixed point type.

- The predefined exceptions:

Constraint_Error: exception;
Program_Error : exception;
Storage_Error : exception;
Tasking_Error : exception;

end Standard;



next up previous contents index
Weiter: A.2 Das Paket Hinauf: A Vordefinierte Pakete Zurück: A Vordefinierte Pakete

Johann Blieberger
Wed Feb 11 09:58:52 MET 1998