Quote Originally Posted by Bruce
I suspect it's this line Hserout [Name[CharCount]]

Found the solution. Enclose all your array elements in parenthesis VS
square brackets.

Hserout [Name(CharCount)]

Works as expected.
Excellent. Thanks Bruce.

I also found out that instead of

For CharCount = 0 to NameCount
Hserout [Name(CharCount)]
Next CharCount

it would compile with a single line of

Hserout [STR Name\Namecount]

which would achieve the same result although "Namecount" would have to be one higher than in the For/Next example.

What I dont understand is why the ICD compile gets upset with the square brackets when the ordinary complier accepts it.

I use the following two bits of code in the same program which follow the same style and both of those are fine.

For CharCount = 0 to NameCount
Read NameBase + CharCount,Char
Name[CharCount]=Char
Next CharCount

For CharCount = 0 to NameCount
LCDout Name[CharCount] ' Boot message.
Next CharCount

It would appear that it is only a problem with Hserout because that command requires square brackets as part of its syntax.
Just tried Hserin with the line Hserin [Name[Namecount]] and that compiles fine with [] or () around the array element.

Mighty strange, will drop David Barker an email to let him know of the inconsistency between the two compiles.