promotion image of download ymail app
Promoted
小雅 發問時間: 電腦與網際網路程式設計 · 1 0 年前

將此語法改寫成VB.NET?

x[0] = IntersectionX1(x1,y1,r1,x2,y2,r2);

if (x[0] == Err) {

ShowMessage("Circle 1 & 2 No Intersection!");

return;

}

y[0] = IntersectionY1(x1,y1,r1,x2,y2,r2);

x[1] = IntersectionX2(x1,y1,r1,x2,y2,r2);

y[1] = IntersectionY2(x1,y1,r1,x2,y2,r2);

x[2] = IntersectionX1(x2,y2,r2,x3,y3,r3);

if (x[2] == Err) {

ShowMessage("Circle 2 & 3 No Intersection!");

return;

}

這段程式能否改寫成VB.NET?

3Q

1 個解答

評分
  • Joint
    Lv 4
    1 0 年前
    最佳解答

    您的程式都不用宣告的嗎? Err 會是什麼?

    有些副程式您也没給.

    不完整的程式,無法幫您測試執行.

    x(0) = IntersectionX1(x1, y1, r1, x2, y2, r2)

    If x(0) = Err Then

    ShowMessage("Circle 1 & 2 No Intersection!")

    Return

    End If

    y(0) = IntersectionY1(x1, y1, r1, x2, y2, r2)

    x(1) = IntersectionX2(x1, y1, r1, x2, y2, r2)

    y(1) = IntersectionY2(x1, y1, r1, x2, y2, r2)

    x(2) = IntersectionX1(x2, y2, r2, x3, y3, r3)

    If x(2) = Err Then

    ShowMessage("Circle 2 & 3 No Intersection!")

    Return

    End If

    • Commenter avatar登入以對解答發表意見
還有問題?馬上發問,尋求解答。