请各位大大们帮忙把代码做简洁点
小弟小学三年级数学没及格事先说明这不是数字运算
这个是用来多窗口制控的
原理是每次开5个窗口 总数10个
窗口1-5 (比如$ff01 ) 有3个数值 窗口6-10有4个数值
$ff01初始值为1当$ff01=1时 为要打开的窗口(窗口1-5从一开始是打开的) =100时为需要关闭但是要作为打开第6个窗口($ff06)的条件 (同时只运行5个窗口) =200时既不打开也不作为判断条件
窗口6-10(比如$ff06)初始值为10$ff06=10时表示这是从未打开过的窗口 其它同窗口1-5
要求是每当达到条件就关掉一个窗口(随机)递进打开后面未打开过的窗口(前面的不再打开) 条件比如手动关闭其中一个窗口(随机)这里不需理会
请各位大大们帮忙把代码改简洁点现在这样太冗长太坑爹了
如果总窗口数为100个 这代码将会长达 16850条(行数=总窗口数*3+17){:face (368):}
要是同时打开窗口为20个 代码更是会长达 21350条(行数=总窗口数*3+同时窗口数*20+2){:face (456):}
这是看到就让人蛋痛的数字 {:face (207):}
请各位大大们帮忙下改简洁点Func CHK2()
If $ff01 = 100 Then
If $ff06 = 10 Then
$ff06 = 1
$ff01 = 200
ElseIf $ff07 = 10 Then
$ff07 = 1
$ff01 = 200
ElseIf $ff08 = 10 Then
$ff08 = 1
$ff01 = 200
ElseIf $ff09 = 10 Then
$ff09 = 1
$ff01 = 200
ElseIf $ff10 = 10 Then
$ff10 = 1
$ff01 = 200
EndIf
ElseIf $ff02 = 100 Then
If $ff06 = 10 Then
$ff06 = 1
$ff02 = 200
ElseIf $ff07 = 10 Then
$ff07 = 1
$ff02 = 200
ElseIf $ff08 = 10 Then
$ff08 = 1
$ff02 = 200
ElseIf $ff09 = 10 Then
$ff09 = 1
$ff02 = 200
ElseIf $ff10 = 10 Then
$ff10 = 1
$ff02 = 200
EndIf
ElseIf $ff03 = 100 Then
If $ff06 = 10 Then
$ff06 = 1
$ff03 = 200
ElseIf $ff07 = 10 Then
$ff07 = 1
$ff03 = 200
ElseIf $ff08 = 10 Then
$ff08 = 1
$ff03 = 200
ElseIf $ff09 = 10 Then
$ff09 = 1
$ff03 = 200
ElseIf $ff10 = 10 Then
$ff10 = 1
$ff03 = 200
EndIf
ElseIf $ff04 = 100 Then
If $ff06 = 10 Then
$ff06 = 1
$ff04 = 200
ElseIf $ff07 = 10 Then
$ff07 = 1
$ff04 = 200
ElseIf $ff08 = 10 Then
$ff08 = 1
$ff04 = 200
ElseIf $ff09 = 10 Then
$ff09 = 1
$ff04 = 200
ElseIf $ff10 = 10 Then
$ff10 = 1
$ff04 = 200
EndIf
ElseIf $ff05 = 100 Then
If $ff06 = 10 Then
$ff06 = 1
$ff05 = 200
ElseIf $ff07 = 10 Then
$ff07 = 1
$ff05 = 200
ElseIf $ff08 = 10 Then
$ff08 = 1
$ff05 = 200
ElseIf $ff09 = 10 Then
$ff09 = 1
$ff05 = 200
ElseIf $ff10 = 10 Then
$ff10 = 1
$ff05 = 200
EndIf
EndIf
EndFunc
页:
[1]