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.

4Additional<strong>Hermes</strong>Constructs notyetbeendiscussed,sowewillbrieydiscussthemhere: Theexamplesinchapters1.1<strong>and</strong>2illustratemostofthenovel<strong>Hermes</strong> constructs.However,therearesomeuseful<strong>Hermes</strong>constructswhichhave 4.1ExpressionBlocks<br />

thisbyrewritingtheCreateserviceofthewindowmanager. ments.Wesupportthisin<strong>Hermes</strong>withanexpressionblock.We'llillustrate astheoper<strong>and</strong>ofanotherstatementorexpression.Alltheoper<strong>and</strong>sofan expressionexcepttheresultareunmodiedbytheexpression. seriesofoperationswhichcomputeasinglevaluewhichisimmediatelyused <strong>Hermes</strong>forthesakeofuniformsyntax.Anexpressionisanoperationor <strong>Hermes</strong>isastatement-orientedlanguage.However,expressionsaresoconvenient<strong>and</strong>sowidelyusedthatitwouldbefoolishtobarthemfrom<br />

receiveCreateCMfromCreate; ifexistsofCreatedWindows[CreateCM.WindowName] Sometimesitisdesirableforanexpressiontoincludeembeddedstate-<br />

else then blockbegin --erroractionifwindowalreadyexists insert (evaluateW:Windowfrom call(WindowApplicationOut#(createofApplicationBuilder)) newW; W.WindowName:=CreateCM.WindowName; GetProgram,WriteToWindowCapability,W.WindowName, (CreateCM.ProgramName,CreateCM.ParmString,<br />

returnCreateCM; endif; endblock; --erroractionifunabletocreateprocess on(WindowApplicationInterface.NotCreated) intoCreatedWindows; end) W.InputToWindow,W.Quit);

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

Saved successfully!

Ooh no, something went wrong!