annotate test/octave.test/string/isxdigit-1.m @ 2737:38463e268d55

[project @ 1997-02-25 05:23:42 by jwe]
author jwe
date Tue, 25 Feb 1997 05:23:54 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2737
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
1 charset = setstr (0:127);
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
2
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
3 result = zeros (1, 128);
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
4
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
5 result ((toascii("A"):toascii("F"))+1) = 1;
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
6 result ((toascii("0"):toascii("9"))+1) = 1;
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
7 result ((toascii("a"):toascii("f"))+1) = 1;
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
8
38463e268d55 [project @ 1997-02-25 05:23:42 by jwe]
jwe
parents:
diff changeset
9 all (isxdigit (charset) == result)