Mercurial > hg > octave-lyh
comparison scripts/strings/dec2base.m @ 4030:22bd65326ec1
[project @ 2002-08-09 18:58:13 by jwe]
author | jwe |
---|---|
date | Fri, 09 Aug 2002 19:00:16 +0000 |
parents | c1c532a0acb2 |
children | 819e3c246702 |
comparison
equal
deleted
inserted
replaced
4029:2cc57b6169cf | 4030:22bd65326ec1 |
---|---|
62 symbols = base; | 62 symbols = base; |
63 base = length (symbols); | 63 base = length (symbols); |
64 if any (diff (sort (toascii (symbols))) == 0) | 64 if any (diff (sort (toascii (symbols))) == 0) |
65 error ("dec2base: symbols representing digits must be unique."); | 65 error ("dec2base: symbols representing digits must be unique."); |
66 endif | 66 endif |
67 elseif (! is_scalar (base)) | 67 elseif (! isscalar (base)) |
68 error ("dec2base: cannot convert from several bases at once."); | 68 error ("dec2base: cannot convert from several bases at once."); |
69 elseif (base < 2 || base > length (symbols)) | 69 elseif (base < 2 || base > length (symbols)) |
70 error ("dec2base: base must be between 2 and 36 or a string of symbols"); | 70 error ("dec2base: base must be between 2 and 36 or a string of symbols"); |
71 endif | 71 endif |
72 | 72 |