Closed curiousdannii-testing closed 2 years ago
557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:
Comment by graham :
This is pretty marginal, because in fact Inform is saying something meaningful and correct here, but I've improved the wording to take away any ambiguity.
Reported by : dfremont
Description :
The Problem message which results from indexing into a list with a value that is not a number identifies the wrong part of the source text as being the issue. In the example below, the blame is placed on the new name "E" (the error message is otherwise correct, saying that the index is not a number).
Steps to reproduce :
Additional information :
The full Problem message:
Problem. You wrote 'let E be entry Foo of
{1, 2, 3}
' : but that doesn't make sense to me as a list entry, because the indication of which entry is not a number. For instance, 'entry 3 of L' is allowed, but not 'entry "six" of L'. (List entries are numbered 1, 2, 3, ...)
I was trying to match one of these phrases:
1. let (e - a new name) be (entry foo of
{ 1 , 2 , 3 } - description of relations of values)
- name of kind)
- value)
I recognised:
entry foo of
{ 1 , 2 , 3 }
= a list entry, holding a number
imported from: [Mantis 1575] Slightly misleading error message on bad list indexBut I didn't recognise 'e'.