n是什么?
Ball是什么?
如果ball是数,用inttostr(Ball[n]),不能用char

解决方案 »

  1.   

    有没有使Temp[n]里面的n增加1呢?
      

  2.   

    sorry ,没写清楚
    原程序是这样的:
    定义好
    Ball:Array[1..13]of byte;
    之后,用如下方法赋值
    for n:=1 to 13 do
    begin
        Ball[n]:=0;
        Showmessage('the answer is '+char(Ball[n]));end;
    结果数组仍为空,这是为什么?
      

  3.   

    for n :=Low(temp) to High(temp) do
    begin
        temp[n]:=0;
        Showmessage('the number is '+inttostr(temp[n]));end;
      

  4.   

    n := 0 ;
    for Low(temp) to High(temp) do
    begin
        n := n+1 ;
        temp[n]:=46;
        Showmessage('the number is '+char(temp[n]));end;
      

  5.   

    for n :=Low(temp) to High(temp) do
    begin
        temp[n]:=45;
        Showmessage('the number is '+inttostr(temp[n]));end;
    char(0)本身就看不见
      

  6.   

    多谢各位大哥,再多问一句inttostr和直接用char()转换类型不一样麽?分数我先给了吧。
      

  7.   

    先确定数组已经存在初值。
    procedure TForm1.Button1Click(Sender: TObject);
    var
    n:Integer;
    begin
    for n:=1 to 13 do
    begin
    ball[n]:=n;
     Showmessage('the answer is '+Inttostr(Ball[n]));
    end;
      

  8.   

    inttostr 是将数字转换字符
    char 和ord相反