首先构造一个10×10的二维数组,然后分别测试不经过字符化直接输出以及经过字符化后输出,相关命令流及测试结果如下:
;export the array directlymodel new;fill the arrayfish def afillarray var(10,10)loop m(1,10)loop n(1,10)var(m,n) = m*nendloopendloopend;export the arrayfish def aexpstatus = file.open('test1.txt',1,1)status = file.write(var,10)status = file.closeend

图1 直接输出数组元素结果图
array elements to stringsmodel newthe arrayfish def afillarray var(10,10)loop m(1,10)loop n(1,10)= m*nendloopendloopend@afillthe arrayfish def aexparray exp(10)count = 0loop m(1,10)count = count + 1msg = ''loop n(1,10)msg = msg + ' ' + string(var(m,n))= msgendloopendloop= file.open('test2.txt',1,1)status = file.write(exp,10)status = file.closeend@aexp

图2 字符化后输出数组元素结果图-1

图3 字符化后输出数组元素结果图-2