Allow S to be determined at run-time