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.

RecordTypeFamily 11.5RecordOperations type{construction ::=record( [component{declaration[,component{declaration] 11.<strong>Hermes</strong>Operations107<br />

Arecordisatupleofvaluescalledcomponents.Whenarecordisinitial-<br />

...]<br />

nentsareinitialized<strong>and</strong>allinitializedcomponentsareequal. ized,thecomponentvariablesexist.Thecomponentvariablesmaythem-<br />

selvesbeeitherinitializedoruninitialized.Whenarecordisuninitialized, thecomponentvariablesdonotexist,areconsidereduninitialized,<strong>and</strong>can-<br />

Tworecordsareequalforcomparisonpurposeswhenthesamecompo-<br />

) notbemadeinitialized. e.gċlause:record( Arecordtypedenitionspeciesthename<strong>and</strong>typeofeachcomponent,<br />

uninitialized.Thepreviousvalueoftherecord,ifany,isdiscarded. New Thenewoperationcreatesaninitializedrecordwhosecomponentsare );statements:statements simple{statement id:clauseid,<br />

uninitialized|issuethenewoperation,<strong>and</strong>theninitializethecomponents, 11.6TableOperations orassignormoveapre-existingrecordvalue. Note:thetwowaystoinitializearecordvariablewhichiscurrently ::=newvariable{name<br />

TableTypeFamily Atableisacollectionofvaluesofthesametype<strong>and</strong>typestate.Thevalues arecalledtheelementsofthetable,thetypetheelementtype,<strong>and</strong>the key::=([formal{variable[,formal{variable]...]) type{construction ::=[ordered]tableofelement{typeelement{typestate [keys[key]...]

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

Saved successfully!

Ooh no, something went wrong!