请朋友们看一下这段代码
For A = 1 To 5
For B = 1 To 5
N(A, B) = Mid(Str$(A), 2, 1) + Mid(Str$(B), 2, 1) ?
Picture1.Print N(A, B);
Next B
Next A
其中打问号的一句看不懂,Str$(A)和Str$(B)不是只有1个数字吗?mid函数怎么还能从第2个字符开始截呢?
[解决办法]
When numbers are converted to strings, a leading space is always reserved for the sign of number. If number is positive, the returned string contains a leading space and the plus sign is implied.
这是msdn对于str/str$的说明
就是说 str$(1)= " 1 ",前面有个空格