The process of solids transforming into a gaseous state or vice versa, without passing through a liquid state.