19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

unit name 1 name 2 name 3 : . . .<br />

unit yottaname 1 yottaname 2 Yname 3 = 10 24 name 1<br />

unit zettaname 1 zettaname 2 Zname 3 = 10 21 name 1<br />

unit exaname 1 exaname 2 Ename 3 = 10 18 name 1<br />

unit petaname 1 petaname 2 Pname 3 = 10 15 name 1<br />

unit teraname 1 teraname 2 Tname 3 = 10 12 name 1<br />

unit giganame 1 giganame 2 Gname 3 = 10 9 name 1<br />

unit meganame 1 meganame 2 Mname 3 = 10 6 name 1<br />

unit kiloname 1 kiloname 2 kname 3 = 10 3 name 1<br />

unit hectoname 1 hectoname 2 hname 3 = 10 2 name 1<br />

unit dekaname 1 dekaname 2 daname 3 = 10name 1<br />

unit deciname 1 deciname 2 dname 3 = 10 −1 name 1<br />

unit centiname 1 centiname 2 cname 3 = 10 −2 name 1<br />

unit milliname 1 milliname 2 mname 3 = 10 −3 name 1<br />

unit microname 1 microname 2 µname 3 = 10 −6 name 1<br />

unit nanoname 1 nanoname 2 nname 3 = 10 −9 name 1<br />

unit piconame 1 piconame 2 pname 3 = 10 −12 name 1<br />

unit femtoname 1 femtoname 2 fname 3 = 10 −15 name 1<br />

unit attoname 1 attoname 2 aname 3 = 10 −18 name 1<br />

unit zeptoname 1 zeptoname 2 zname 3 = 10 −21 name 1<br />

unit yoctoname 1 yoctoname 2 yname 3 = 10 −24 name 1<br />

where µ is the Unicode character U+00B5 MICRO SIGN. Third, a dim declaration and a unit or SI unit declaration<br />

may be collapsed into a single declaration by writing the unit or SI unit declaration in place of the default<br />

clause in the dim declaration and omitting the colon and dimension from the unit declaration. Thus<br />

dim Length SI unit meter meters m<br />

dim Power = Energy/Time SI unit watt watts W = joule/second<br />

is understood to abbreviate<br />

dim Length default meter;SI unit meter meters m: Length<br />

dim Power = Energy/Time default watt;SI unit watt watts W: Power = joule/second<br />

In this way the names of the seven SI base units, along with all possible plural and prefixed forms, may be concisely<br />

defined as follows:<br />

dim Length SI unit meter meters m<br />

dim Mass default kilogram;SI unit gram grams g: Mass<br />

dim Time SI unit second seconds s<br />

dim ElectricCurrent SI unit ampere amperes A<br />

dim Temperature SI unit kelvin kelvins K<br />

dim AmountOfSubstance SI unit mole moles mol<br />

dim LuminousIntensity SI unit candela candelas cd<br />

Note the subtle difference in the declaration of Mass that allows the default unit to be kilogram rather than gram.<br />

35.4 Absorbing Units<br />

Syntax:<br />

StaticParam ::= Id [Extends] [absorbs unit ]<br />

| unit Id [ : DimRef ] [absorbs unit ]<br />

239

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

Saved successfully!

Ooh no, something went wrong!