In SX Microcontrollers, SX/B Compiler and SX-Key Tool, edgellmh wrote: I am having problems accessing or assigning array values using a byte variable as the accessor. I am unable to get code to compile whether or not the accessor is a global or local variable. The following code does not compile: DO strLen = strLen + 1 READ idx, char idx = idx + 1 string(strlen - 1) = char GOSUB CalcCRC IF strLen = 15 THEN EXIT IF char = EOM THEN EXIT LOOP strLen is a local byte variable and string is a global array defined as: string VAR byte(16) The error message is: ... Error 10, Pass 1: INVALID NUMBER OF PARAMETERS and the line string(strLen -1) = char is highlighted. I get the same error if I just use string(strLen) = char. It compiles fine if I use string(15) = char I have had the same problem compiling code from examples taken off of this site or from product information code. marshall edgell ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=394728 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)