So I am making a program that decodes matrices, and it takes the matrix, puts it into a list, and then the program takes each number from that list and finds what letter it represents. To do this, the alphabet is stored into string1, and then it takes the 1st term of the list, and finds its place in the string using the sub( command as: sub(Str1,N,1)

The bug is that (or alleged bug) it returns an error of **ERRDOMAIN:**

I then try the command on the home screen witht he same exact syntax, but with an actual number instead of a variable and it works

Then I check the value of N to see if it is indeed **0<N<26** and an integer, which it is, however it still returns **ERRDOMAIN:**

Then I check by storing the integer value of N into another variable R, and try the sub( command with R: sub(Str1,R,1) and it works, but not with N

Then I check by clearing all variables then manually storing the desired integer into N, and do the command, and it works, with N

So it must work then, but no. I run my program again, it sucesfully enters the alphabet into Str1, sucesfully gives out the list with the matrix numbers, all positive integers 0<N<26, but sitll **ERRDOMAIN:**

Is this a bug in the calculator? Is there a way to fix this? Thank you very much for reading! :)