diff scripts/strings/str2num.m @ 7411:83a8781b529d

[project @ 2008-01-22 21:52:25 by jwe]
author jwe
date Tue, 22 Jan 2008 21:52:26 +0000
parents a1dbe9d80eee
children 502e58a0d44f
line wrap: on
line diff
--- a/scripts/strings/str2num.m
+++ b/scripts/strings/str2num.m
@@ -39,3 +39,10 @@
   endif
 
 endfunction
+
+%!assert(str2num ("-1.3e2") == -130 && str2num ("[1, 2; 3, 4]") == [1, 2; 3, 4]);
+
+%!error str2num ();
+
+%!error str2num ("string", 1);
+