In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: In SX/B version 1.51.03 if you attempt to use a WORD variable as an array index you should get an error message (usually incorrect number of parameters). But the SEROUT command does not issue an error. In fact it will send the address of the array instead. [code] DEVICE SX28, OSCXT1, TURBO, STACKX, OPTIONX, BOR26 FREQ 4_000_000 sendStr VAR BYTE(11) temp VAR WORD PROGRAM Start NOSTARTUP Start: PUT sendStr, "HELLO THERE" FOR temp = 0 TO 10 SEROUT RA.0,T9600,sendStr(temp) ' DO NOT USE A WORD AS AN ARRAY INDEX NEXT END The "fix" is to just use the LSB of the word variable. [code] DEVICE SX28, OSCXT1, TURBO, STACKX, OPTIONX, BOR26 FREQ 4_000_000 sendStr VAR BYTE(11) temp VAR WORD PROGRAM Start NOSTARTUP Start: PUT sendStr, "HELLO THERE" FOR temp = 0 TO 10 SEROUT RA.0,T9600,sendStr(temp_LSB) NEXT END [/code] Bean ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=136824#m217845 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)