커뮤니티
부탁 드립니다.
2018-07-28 15:04:18
128
글번호 120965
도움주심에 감사 드립니다.
TL11 선이 그어지다가 새로운 TL11선이 나타나면 기존선은 중지 되고 새로운 TL11선만 그어지게
또
TL22 선이 그어지다가 새로운 TL22선이 나타나면 기존선은 중지 되고 새로운 TL22선만 그어지도록 부탁 드립니다.
미리 감사드립니다.
input :p100(100),적청3병갯수(3), n(4),사각형그리기1삭제0(0);
var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0);
var : cnt2(0),d2(0),t2(0),h2(0),l2(0);
var : tl11(0),tl12(0),tl13(0),tl14(0);
var : tl21(0),tl22(0),tl23(0),tl24(0);
var : v1(0),v2(0),v3(0),v4(0);
v1 = iff(C>O,abs(C-O),0);
v2 = AccumN(v1,p100);
v3 = countif(C>O,p100);
v4 = v2/v3;
if C > O Then
T = 1;
if C < O Then
T = -1;
if T == 1 and T[1] != 1 Then
{
cnt1 = 0;
d1 = sdate;
t1 = stime;
h1 = H;
l1 = L;
}
if T == 1 Then
{
cnt1 = cnt1+1;
if h > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
}
if T == -1 and T[1] != -1 Then
{
cnt2 = 0;
d2 = sdate;
t2 = stime;
h2 = H;
l2 = L;
}
if T == -1 Then
{
cnt2 = cnt2+1;
if h > h2 Then
h2 = h;
if l < l2 Then
l2 = l;
}
if T != 1 and T[1] == 1 and cnt1[1] >= 적청3병갯수 and C[1] > O[1] Then
{
var1 = h1;
var2 = L1;
if Condition1[1] == true then
TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]);
tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1);
if 사각형그리기1삭제0==1 then
{
tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1);
tl13 = TL_New(d1,t1,h1,d1,t1,l1);
tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);}
TL_SetColor(Tl11,RED);
TL_SetColor(Tl12,RED);
TL_SetColor(Tl13,RED);
TL_SetColor(Tl14,RED);
Condition1 = false;
if h1-l1 >= v4*n Then
Condition1 = true;
if Condition1 == false Then
TL_Delete(TL11);
}
Else
{
if Condition1 == true then
{
TL_SetExtRight(TL11,true);
TL_Setsize(TL11,2);
}
}
if T != -1 and T[1] == -1 and cnt2[1] >= 적청3병갯수 and C[1] < O[1] then
{
var3 = H2;
var4 = L2;
if Condition2[1] == true then
TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]);
tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2);
if 사각형그리기1삭제0==1 then
{
tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2);
tl23 = TL_New(d2,t2,h2,d2,t2,l2);
tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);}
TL_SetColor(Tl21,BLUE);
TL_SetColor(Tl22,BLUE);
TL_SetColor(Tl23,BLUE);
TL_SetColor(Tl24,BLUE);
Condition2 = false;
if h2-l2 >= v4*N Then
Condition2 = true;
if Condition2 == false Then
TL_Delete(TL22);
}
Else
{
if Condition2 == true then
{
TL_SetExtRight(TL22,true);
TL_Setsize(TL22,2);
}
}
답변 1
예스스탁 예스스탁 답변
2018-07-30 12:48:00
안녕하세요
예스스탁입니다.
input :p100(100),적청3병갯수(3), n(4),사각형그리기1삭제0(0);
var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0);
var : cnt2(0),d2(0),t2(0),h2(0),l2(0);
var : tl11(0),tl12(0),tl13(0),tl14(0);
var : tl21(0),tl22(0),tl23(0),tl24(0);
var : v1(0),v2(0),v3(0),v4(0);
v1 = iff(C>O,abs(C-O),0);
v2 = AccumN(v1,p100);
v3 = countif(C>O,p100);
v4 = v2/v3;
if C > O Then
T = 1;
if C < O Then
T = -1;
if T == 1 and T[1] != 1 Then
{
cnt1 = 0;
d1 = sdate;
t1 = stime;
h1 = H;
l1 = L;
}
if T == 1 Then
{
cnt1 = cnt1+1;
if h > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
}
if T == -1 and T[1] != -1 Then
{
cnt2 = 0;
d2 = sdate;
t2 = stime;
h2 = H;
l2 = L;
}
if T == -1 Then
{
cnt2 = cnt2+1;
if h > h2 Then
h2 = h;
if l < l2 Then
l2 = l;
}
if T != 1 and T[1] == 1 and cnt1[1] >= 적청3병갯수 and C[1] > O[1] Then
{
var1 = h1;
var2 = L1;
if h1-l1 >= v4*n Then
{
TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],value88[1]);
tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1);
value88 = var1;
}
if 사각형그리기1삭제0==1 then
{
tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1);
tl13 = TL_New(d1,t1,h1,d1,t1,l1);
tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);
}
TL_SetColor(Tl11,RED);
TL_SetColor(Tl12,RED);
TL_SetColor(Tl13,RED);
TL_SetColor(Tl14,RED);
}
Else
{
TL_SetEnd(TL11,sdate,stime,value88);
TL_Setsize(TL11,2);
}
if T != -1 and T[1] == -1 and cnt2[1] >= 적청3병갯수 and C[1] < O[1] then
{
var3 = H2;
var4 = L2;
if h2-l2 >= v4*N Then
{
TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],value99[1]);
tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2);
value99 = var4;
}
if 사각형그리기1삭제0==1 then
{
tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2);
tl23 = TL_New(d2,t2,h2,d2,t2,l2);
tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);
}
TL_SetColor(Tl21,BLUE);
TL_SetColor(Tl22,BLUE);
TL_SetColor(Tl23,BLUE);
TL_SetColor(Tl24,BLUE);
}
Else
{
TL_SetEnd(TL22,sdate,stime,value99);
TL_Setsize(TL22,2);
}
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 도움주심에 감사 드립니다.
TL11 선이 그어지다가 새로운 TL11선이 나타나면 기존선은 중지 되고 새로운 TL11선만 그어지게
또
TL22 선이 그어지다가 새로운 TL22선이 나타나면 기존선은 중지 되고 새로운 TL22선만 그어지도록 부탁 드립니다.
미리 감사드립니다.
input :p100(100),적청3병갯수(3), n(4),사각형그리기1삭제0(0);
var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0);
var : cnt2(0),d2(0),t2(0),h2(0),l2(0);
var : tl11(0),tl12(0),tl13(0),tl14(0);
var : tl21(0),tl22(0),tl23(0),tl24(0);
var : v1(0),v2(0),v3(0),v4(0);
v1 = iff(C>O,abs(C-O),0);
v2 = AccumN(v1,p100);
v3 = countif(C>O,p100);
v4 = v2/v3;
if C > O Then
T = 1;
if C < O Then
T = -1;
if T == 1 and T[1] != 1 Then
{
cnt1 = 0;
d1 = sdate;
t1 = stime;
h1 = H;
l1 = L;
}
if T == 1 Then
{
cnt1 = cnt1+1;
if h > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
}
if T == -1 and T[1] != -1 Then
{
cnt2 = 0;
d2 = sdate;
t2 = stime;
h2 = H;
l2 = L;
}
if T == -1 Then
{
cnt2 = cnt2+1;
if h > h2 Then
h2 = h;
if l < l2 Then
l2 = l;
}
if T != 1 and T[1] == 1 and cnt1[1] >= 적청3병갯수 and C[1] > O[1] Then
{
var1 = h1;
var2 = L1;
if Condition1[1] == true then
TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]);
tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1);
if 사각형그리기1삭제0==1 then
{
tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1);
tl13 = TL_New(d1,t1,h1,d1,t1,l1);
tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);}
TL_SetColor(Tl11,RED);
TL_SetColor(Tl12,RED);
TL_SetColor(Tl13,RED);
TL_SetColor(Tl14,RED);
Condition1 = false;
if h1-l1 >= v4*n Then
Condition1 = true;
if Condition1 == false Then
TL_Delete(TL11);
}
Else
{
if Condition1 == true then
{
TL_SetExtRight(TL11,true);
TL_Setsize(TL11,2);
}
}
if T != -1 and T[1] == -1 and cnt2[1] >= 적청3병갯수 and C[1] < O[1] then
{
var3 = H2;
var4 = L2;
if Condition2[1] == true then
TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]);
tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2);
if 사각형그리기1삭제0==1 then
{
tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2);
tl23 = TL_New(d2,t2,h2,d2,t2,l2);
tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);}
TL_SetColor(Tl21,BLUE);
TL_SetColor(Tl22,BLUE);
TL_SetColor(Tl23,BLUE);
TL_SetColor(Tl24,BLUE);
Condition2 = false;
if h2-l2 >= v4*N Then
Condition2 = true;
if Condition2 == false Then
TL_Delete(TL22);
}
Else
{
if Condition2 == true then
{
TL_SetExtRight(TL22,true);
TL_Setsize(TL22,2);
}
}