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.

possible,<strong>and</strong>storesitinadestinationvariable.Theinputportmustbe Receive Thereceivestatementdequeuesamessagefromaninputport,ifthisis simple{statement ::=receivecallmessage{variablefrominport{variable 11.<strong>Hermes</strong>Operations123<br />

initialized.<br />

thenthereceivestatementwillblockindenitely. beraised. toreceiveisnon-deterministic. Themessageismovedintothedestinationvariable.Thisvariablewillbein theentrytypestateassociatedwiththeinport.Thechoiceofwhichmessage port.Thepreviouscontentsofthedestinationvariable,ifany,arediscarded. Iftheinporthasconnections,butnomessageiseversenttotheinport, Iftheinporthasnoconnections,thentheDisconnectedexceptionwill Onnormalcompletionofreceive,amessageisdequeuedfromthein-<br />

Return Thereturnstatementreturnsacallmessagetoitscaller<strong>and</strong>resumesexecutionofthecaller.Optionally,anexceptioncanbereturnedtothecaller.<br />

simple{statement<br />

qualier. inthedenition.Theexceptionnameiswrittenwithoutanytypename ceptionforthatcallmessagetype|eitherDiscarded,oranexceptionlisted Thereturnstatementmustspecifyeithernoexception,oralegalex-<br />

::=returncallmessage{variable<br />

Thecallmessagemusthavethetypestateattributesassociatedwiththe [exceptionuser{exception{name]<br />

whichisexpectedbythecaller. appropriateexceptiontypestateforareturnwithanexception.Ifthetypestateishigher,coercionsareinsertedtolowerthetypestatetoexactlythat<br />

kindofreturn|theexittypestateforareturnwithoutexceptions,orthe<br />

theequivalenteectofprocedures,codethereturnstatementasthelast executablestatementoftheprocess,orfollowthereturnstatementwith anexitstatementjumpingtotheendoftheprocess. ment,aswouldbethecaseifprocesseswerepassiveprocedures.Toproduce continuesexecuting. execution.Ifanexceptionisspecied,thatexceptionisraisedinthecaller, notintheprocessissuingthereturnstatement.Theprocessissuingreturn Thereisnoautomaticterminationofaprocessexecutingareturnstate-<br />

Afterthereturn,thecallmessageisuninitialized.Thecallerresumes

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

Saved successfully!

Ooh no, something went wrong!