looking at error report

This commit is contained in:
Danny Yoo 2011-08-19 14:55:19 -04:00
parent 8ec8f3043c
commit 47d2708f23
4 changed files with 10 additions and 10 deletions

View File

@ -60,7 +60,7 @@
}
testArgument(
MACHINE,
function () { parameterizedPredicateName.apply(null, args); },
function () { return parameterizedPredicateName.apply(null, args); },
function (x) {
return parameterizedPredicate.apply(null, [x].concat(args));
},

View File

@ -651,7 +651,7 @@
installPrimitiveProcedure(
'string',
baselib.arity.arityAtLeast(0),
baselib.arity.makeArityAtLeast(0),
function (MACHINE) {
var i;
var chars = [];
@ -666,11 +666,11 @@
'string->list',
1,
function (MACHINE) {
var str = checkString(MACHINE, 'string->list', 0);
var str = checkString(MACHINE, 'string->list', 0).toString();
var i;
var result = NULL;
for (i = 0; i < str.length; i++) {
result = makePair(baselib.chars.makeChar(elts[elts.length - 1 - i]), result);
for (i = str.length - 1; i >= 0; i--) {
result = makePair(baselib.chars.makeChar(str[i]), result);
}
return result;
});
@ -769,7 +769,7 @@
function (MACHINE) {
var firstArg = checkString(MACHINE, 'string-ref', 0).toString();
var index = baselib.numbers.toFixnum(
checkNaturalInRange(MACHINE, 'string-ref', 0,
checkNaturalInRange(MACHINE, 'string-ref', 1,
0, firstArg.length));
return baselib.chars.makeChar(firstArg[index]);
});

View File

@ -390,7 +390,7 @@ symbol->string
vector->list
list->vector
;; build-vector
;; char=?
char=?
;; char<?
;; char>?
;; char<=?

View File

@ -19,6 +19,6 @@
#\e
#\l
#\o
(list #\x #\y #\z)
(list #\x)
(list)
(#\x #\y #\z)
(#\x)
()