18.10.2014 Views

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

382 Appendix C<br />

-- function "&" (Left: Str<strong>in</strong>g; Right: Str<strong>in</strong>g) return Str<strong>in</strong>g;<br />

-- function "&" (Left: Character; Right: Str<strong>in</strong>g) return Str<strong>in</strong>g;<br />

-- function "&" (Left: Str<strong>in</strong>g; Right: Character) return Str<strong>in</strong>g;<br />

-- function "&" (Left: Character; Right: Character) return Str<strong>in</strong>g;<br />

type Wide_Str<strong>in</strong>g is array(Positive range ) of Wide_Character;<br />

pragma Pack(Wide_Str<strong>in</strong>g);<br />

--The predef<strong>in</strong>ed operators for this type correspond to those for Str<strong>in</strong>g<br />

type Duration is delta implementation-def<strong>in</strong>ed range implementation-def<strong>in</strong>ed;<br />

--The predef<strong>in</strong>ed operators for the type Duration are the same as for<br />

--any fixed po<strong>in</strong>t type.<br />

--The predef<strong>in</strong>ed exceptions:<br />

Constra<strong>in</strong>t_Error: exception;<br />

Program_Error : exception;<br />

Storage_Error : exception;<br />

Task<strong>in</strong>g_Error : exception;<br />

end Standard;<br />

C.5 The Package <strong>Ada</strong>.Text_Io<br />

In the package <strong>Ada</strong>.Standard the follow<strong>in</strong>g parameter arguments are used:<br />

Parameter name<br />

aft<br />

base<br />

exp<br />

file<br />

fore<br />

form<br />

item<br />

last<br />

mode<br />

name<br />

width<br />

Purpose<br />

The number of digits after the decimal place<br />

The base of the number.<br />

The number of characters <strong>in</strong> the exponent. For the<br />

number 123.45678:<br />

exp=>0 would give a format of => 123.45678<br />

exp=>2 would give a format of => 1.2345678E+2<br />

exp=>4 would give a format of => 1.2345678E+002<br />

file_type:<br />

The file descriptor which is read from or written to.<br />

file_access:<br />

The access value of the file_type.<br />

The number of digits before the decimal place<br />

Form of the created output file.<br />

The item to be read / written.<br />

The last character read from the str<strong>in</strong>g.<br />

The mode of the operation read, write or append.<br />

The name of the file as a Str<strong>in</strong>g.<br />

The number of characters to be read / written<br />

© M A Smith - May not be reproduced without permission

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!