28.01.2015 Views

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

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.

154B.2.TypeClasses boolean nominal enumeration variant table polymorph<br />

orderedscalar:includesinteger,real,<strong>and</strong>anyenumerationde- inport outport callmessage numeric:includesinteger<strong>and</strong>real. variantcomponent:Thisisnot,strictlyspeaking,atypeclass.Itis enumerationorboolean:includesenumeration<strong>and</strong>boolean. reallyavariableclass,comprisingvariablesthatarecomponentsof isinclassvariant. variableswhosetypesareinthevarianttypeclass.Thus,x.visin theclassvariantcomponentif<strong>and</strong>onlyifxisavariablewhosetype nedwiththeorderedkeywordpresent.<br />

orderedtable:Allorderedtablestypes,i.e.,alltypesdenedwith<br />

copyable:Alltypesotherthaninputports,callmessages,<strong>and</strong>types newable:Allinputport,table,<strong>and</strong>recordtypes,i.e.,alltypesdened string:Allorderedtabletypeswhoseelementtypesareenumerations.Thatis,atypetisinclassstringif<strong>and</strong>onlyif:(1)tisinclass<br />

thetabletypeconstructor<strong>and</strong>withtheorderedkeywordpresent. witheithertheinport,table,orrecordtypeconstructor. orderedtable;<strong>and</strong>(2)theelementtypeoftisinclassenumeration. thatcancontainsuchobjects.Thisclassincludestheclassesinteger, real,nominal,enumeration,boolean,<strong>and</strong>outport.Italsoincludes copyable. theclasspolymorphalthoughapolymorphobjectmaywrapanuncopyableobject(anyattempttocopysuchapolymorphwouldraise<br />

tableisincopyableif<strong>and</strong>onlyiftheassociatedelementtypeisin typesofallthedenedcomponentsareincopyable.Atypeinclass therecordtypeconstructor)isinclasscopyableif<strong>and</strong>onlyifthe Uncopyable).Atypeinclassvariant,orarecordtype(denedwith

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

Saved successfully!

Ooh no, something went wrong!