看板 Visual_Basic 關於我們 聯絡資訊
希望能夠根據call函數的次數產生想要的值 依序為1,2,3,4,5 2,3,4,5,6 及前5次產生1~5的值,6到10次產生2~6的數值 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() for t=1 to 10 call d(t) next t End Sub Function d(t) as integer d=???? end ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Function該怎麼寫d才可以產生我想要的值,希望只用一個function就解決。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.195.17.179
Marty:if t<=5 then d=t else d=t-4 end if 01/23 20:21