Finding an element with Ranged List

21 views
Skip to first unread message

Irwin Rodriguez

unread,
Jun 24, 2022, 7:59:51 AM6/24/22
to The Ring Programming Language
Hi, 

I think I've found one bug regarding searching on ranged lists. It seems the 'find()' function doesn't care about a ranged list against a manually feeded list.

Here's an example:

image.png

As you can see, the variable List has the correct range of numbers in both cases and the sought number is the same "7" which leads me to think it could be an internal treatment regarding list in the Find function.

Am I missing something?

thanks!

Ilir

unread,
Jun 24, 2022, 8:16:55 AM6/24/22
to The Ring Programming Language
Hello Rodriguez,

["0":"9"] != ["0","1","2","3","4","5","6","7","8","9"]

["0":"9"] = [["0","1","2","3","4","5","6","7","8","9"]]

where ["0":"9"] gives you a list inside the list!

What you want is

List = "0":"9" // gives ["0","1","2","3","4","5","6","7","8","9"]
Reply all
Reply to author
Forward
0 new messages