Mercurial > repos > public > sbplib
view default_struct.m @ 583:75f9b7a80f28 feature/grids
Allow more than one type in type assertion
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2017 14:08:31 +0200 |
parents | 46256fffa329 |
children |
line wrap: on
line source
function default_struct(s, val) if evalin('caller',sprintf('~exist(''%s'',''var'')',s)) given = []; else given = evalin('caller', s); end final = copyWithDefault(given, val); assignin('caller', s, final); end