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.

assumingitcanexitnormally.Thetypestateonexitfromthefor-inspect typestate<strong>and</strong>othertypestateattributesarethesameastheywerebefore themeetof(1)thetypestateinwhichtheinspectvariableisintheelement thefor-inspectstatement,(2)thetypestateattheendofthemainclause, 11411.6.TableOperations<br />

statementisthemeetofthetypestateonentrytothemainclause<strong>and</strong>the selectedinthatorder.<br />

unconditionalexit,sinceitispossibleforthemainclausetobeexecuted canalwaysterminatenormally,evenifthemainclauseterminatesinan typestatepriortothefor-inspectstatement.Afor-inspectstatement Thetypestateonentrytothemainclauseofafor-inspectstatementis<br />

Theoperatorsizeofevaluatestoanintegercontainingthenumberof elementsinthetable.Thetablemustbeinitialized. zerotimes. Size Position-of-element secondary::=sizeofsecondary<br />

Thisoperationcanbeappliedonlytoconstantcopiesofelementsselected fromanorderedtable.Theseconstantcopiesareproducedonlywithina whereexpressionofaselector,aninspect,orafor-inspectstatement. elementwhichwasusedtoproducetheconstantcopystoredintheelement variable.Positionsbeginat0. Theoperationevaluatestoanintegerwhichisthepositionoftheselected secondary::=positionofelement{variable<br />

thestring. Example:<br />

Position-of-selector string

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

Saved successfully!

Ooh no, something went wrong!