Just a note - I found something, that works: >import std.stdio; > >void main(string[] args) >{ > immutable cond = args[1]=="a"; > if (cond) write("A"); > scope (exit) if (cond) write("B"); > > write("C"); >} I'm using the immutable variable to avoid, that the condition changes later.