'diag' moved to assign functions.