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

Create successful ePaper yourself

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

182B.6.OperationDescriptions position{of{element(result,element) TypeRules: Preconditions: Description:Setresulttothepositionoccupiedbyelementinthetableonwhichthecorrespondingselectorisoperating.Ifthetablehas<br />

var(result) pos(element) predefined!integerPostconditions:<br />

makeinit(result) Exceptions:Depletion<br />

Qualier:absent position{of{selector(result,table)Exceptions:Depletion,NotFound changedsincetheselectoroperationcommenced,thenthepositionof itscurrentposition. elementatthetimetheselectoroperationbeganisused,ratherthan TypeRules:<br />

table2orderedtable result predefined!integer Seex11.6,p.114<br />

Preconditions: SpecialRules:Thestatementqualierisaselector.Theresultvariable init(table) SeealsoSpecialRules var(result) Postconditions:<br />

typeoftable.Theentrytypestatefortheselectoristheentrytypestate identiedinthatselectormustbeoftypepredefined!boolean<strong>and</strong> oftheelementvariableidentiedintheselectormustbetheelement musthavetheinitattributeonnormalexitfromtheselector.Thetype SeealsoSpecialRules makeinit(result)<br />

Description:Setresulttothepositionofanelementfromtablethat selector,minusanyattributesinvolvingtheresultorelementvariable. SeeSectionforadiscussionofhowtypestatesarecomputedfor ofthepositionofselectorstatement.Thetypestateonnormalexit<br />

ordered,usethepositionoftherstsuchelement. selectors. satisestheselectoridentiedintheinstructionqualier.Iftableis thepostconditionruleslistedabovetothenormalexittypestateofthe fromthepositionofselectorstatementiscomputedbyapplying<br />

Qualier:selector Seex11.6,p.114

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

Saved successfully!

Ooh no, something went wrong!