From 4da9cc3a8726af5b6d7c211e7cffb79b269002d2 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Tue, 27 Dec 2022 15:32:55 +0100 Subject: [PATCH] improve error message for wrong index Use ~S instead of ~A to make the difference between e.g. "0" and 0 clear. Fixes #687. --- src/c/error.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c/error.d b/src/c/error.d index 486960612..eb10ab5c3 100644 --- a/src/c/error.d +++ b/src/c/error.d @@ -345,11 +345,11 @@ FEwrong_index(cl_object function, cl_object a, int which, cl_object ndx, { const char *message1 = "In ~:[an anonymous function~;~:*function ~A~], " - "the ~*index into the object~% ~A.~%" + "the ~*index into the object~% ~S~%" "takes a value ~D out of the range ~A."; const char *message2 = "In ~:[an anonymous function~;~:*function ~A~], " - "the ~:R index into the object~% ~A~%" + "the ~:R index into the object~% ~S~%" "takes a value ~D out of the range ~A."; cl_object limit = ecl_make_integer(nonincl_limit-1); cl_object type = ecl_make_integer_type(ecl_make_fixnum(0), limit);