Mercurial > hg > octave-terminal
changeset 7617:9dca8b03dfe8
Allow cast to 'char'.
author | David Bateman <dbateman@free.fr> |
---|---|
date | Thu, 20 Mar 2008 17:00:15 +0100 |
parents | fb4fa07bc364 |
children | 3209a584e1ac |
files | scripts/ChangeLog scripts/miscellaneous/cast.m |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,7 @@ 2008-03-20 David Bateman <dbateman@free.fr> + * miscellaneous/cast.m: Also allow cast to "char". + * general/rotdim.m: Ensure k is an integer scale. * general/circshift.m: If matrix is empty fast return.
--- a/scripts/miscellaneous/cast.m +++ b/scripts/miscellaneous/cast.m @@ -30,7 +30,7 @@ if (ischar (typ)) if (any (strcmp (typ, {"int8"; "uint8"; "int16"; "uint16"; "int32"; "uint32"; "int64"; "uint64"; - "double"; "single"; "logical"}))) + "double"; "single"; "logical"; "char"}))) retval = feval (typ, val); else error ("cast: type name `%s' is not a built-in type", typ);