The type casting to string is not the problem here. The problem is that, when you include a new file, the code that it is in there, outside any function or subroutine, won't be executed like if they were in your main file.
If you add them to a function (or subroutine) in your test.agc file, and call this function at some point in your main.agc, then it will work.
Better show you than explain:
test.agc:
Function SetMyValues()
myValues[1] = 10
myValues[2] = 20
myValues[3] = 42
EndFunction
main.agc:
dim myValues [3]
#include "test.agc"
SetMyValues()
do
print (myValues[1])
print (myValues[2])
print (myValues[3])
Sync()
Loop
You'll notice that in the main.agc, before the main loop starts, I'm calling the function, so the values are correctly set.
This is based on my observations, so maybe some TGC experts can confirm it
Cheers
----------
Paulo
http://www.mobilecreators.com