| r34 vs r35 | ||
|---|---|---|
| ... | ... | |
| 2 | 2 | [[../|상위 문서]] |
| 3 | 3 | [[../include 결과|결과 보기]] |
| 4 | 4 | == 변수 a=1 == |
| 5 | 기본형식 : a==1 | |
| 5 | * 기본형식 : a==1 | |
| 6 | 6 | {{{#!wiki style="word-break: keep-all;" |
| 7 | 7 | ||<table bgcolor=transparent,transparent> 구분 || a= || +a= || -a= || 'a'= || "a"= || \[a\]= [* if 조건문을 \[a\]==1 식으로 걸어놓음.] || \[a=\][* if 조건문을 \[a==1\] 식으로 걸어놓음.] || calc(a)= || calc(+a)= || calc[a]= || calc[+a]= || calc['a']= || @@_@a@= || |
| 8 | 8 | || ==1[* 단, -a= 열에는 if 조건문을 -a==-1 으로 걸어놓음.] || {{{#!if a==1 |
| ... | ... | |
| 63 | 63 | 출력}}} || |
| 64 | 64 | }}} |
| 65 | 65 | |
| 66 | == 변수 b=text == | |
| 67 | ||<table bgcolor=transparent,transparent> 구분 || @@_@b@= || | |
| 68 | || =text || {{{#!if @b@==text | |
| 69 | 출력}}} || | |
| 70 | || =text{{{#gray ''(space)''}}} || {{{#!if @b@== text | |
| 71 | 출력}}} || | |
| 72 | ||
| 73 | == 변수 c\= == | |
| 74 | null과 "" 이 어떤 조건에서 되는지 테스트. | |
| 75 | ||<table bgcolor=transparent,transparent> 구분 ||<width=20%> {{{#blue c==null}}} ||<width=20%> {{{#orange c==""}}} ||<width=20%> c=={{{#gray ''(space)''}}} ||<width=20%> c="{{{#gray ''(space)''}}}" || | |
| 76 | || 출력테스트 || {{{#!if c==null | |
| 77 | 출력}}} || {{{#!if c=="" | |
| 78 | 출력}}} || {{{#!if c== | |
| 79 | 출력}}} || {{{#!if c==" " | |
| 80 | 출력}}} || | |
| 81 | ||
| 82 | == this | |
| 83 | ===# this \[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\] 관련 테스트 #=== | |
| 84 | this['true']=true 테스트 | |
| 85 | {{{#!if this['true']==true | |
| 86 | 출력 }}} | |
| 87 | ---- | |
| 88 | this['a'] == null 테스트 | |
| 89 | {{{#!if this['a'] == null | |
| 90 | 출력}}} | |
| 91 | ---- | |
| 92 | a=b 테스트 : 아무 변수도 호출하지 않으면 null == null 상태가 된다. | |
| 93 | {{{#!if a==b | |
| 94 | 출력}}} | |
| 95 | ---- | |
| 96 | this['a']=this['b'] 테스트 : 아무 변수도 호출하지 않으면 null == null 상태가 된다. | |
| 97 | {{{#!if this['a']==this['b'] | |
| 98 | 출력}}} | |
| 99 | ---- | |
| 100 | a+b=c 테스트 (먼저 숫자로 출력되는 변수들끼리 덧셈식이 올바르게 작동하는지를 검증하기 위한 테스트이다.) | |
| 101 | {{{#!if a+b==c | |
| 102 | 출력}}} | |
| 103 | ---- | |
| 104 | this['a']+this['b']=this['c'] 테스트 | |
| 105 | {{{#!if this['a']+this['b']==this['c'] | |
| 106 | 출력}}} | |
| 107 | ---- | |
| 108 | +a+b=+c 테스트 : 아무 변수도 호출하지 않으면 nullnull == null 형식이 되는 것으로 추정된다. | |
| 109 | {{{#!if +a+b==+c | |
| 110 | 출력}}} | |
| 111 | ---- | |
| 112 | (+a)+(+b)=+c 테스트 : 숫자값으로 연산하고자 +를 선언했으므로 괄호로 엮어야 한다. | |
| 113 | {{{#!if (+a)+(+b)==+c | |
| 114 | 출력}}} | |
| 115 | ---- | |
| 116 | +this['a']+this['b']=+this['c'] 테스트 : 변수 호출하지 않으면 ++=상태가 된다. | |
| 117 | {{{#!if +this['a']+this['b']==+this['c'] | |
| 118 | 출력}}} | |
| 119 | ---- | |
| 120 | (+this['a'])+(+this['b'])=+this['c'] 테스트 : 변수 호출하지 않으면 ++=상태가 된다. | |
| 121 | {{{#!if (+this['a'])+(+this['b'])==+this['c'] | |
| 122 | 출력}}} | |
| 123 | ||
| 124 | {{{#orange 결론 : }}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 125 | this\[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\]}}}는 텍스트 값으로 출력된다. | |
| 126 | ||
| 127 | === this 관련 테스트 표 === | |
| 128 | {{{#!wiki style="display: inline; font-family: monospace;" | |
| 129 | this}}} 함수 안에 {{{#!wiki style="display: inline; font-family: monospace;" | |
| 130 | {{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}}}} 를 포함하여 {{{this}}} 함수 안에 다른 모양을 넣고 테스트를 해보는 문단이다. | |
| 131 | {{{#!wiki style="display: inline; font-family: monospace;" | |
| 132 | this\[{{{#orange \+}}}{{{#green 변수명}}}\]}}}과, {{{#!wiki style="display: inline; font-family: monospace;" | |
| 133 | this\[{{{#green 변수명}}}\]}}}도 지원되는지 테스트, this{{{#orange .}}}{{{#green 변수명}}}이 텍스트값으로만 될 수 있는지 테스트. | |
| 134 | ||
| 66 | == 변수 this.a=1 == | |
| 135 | 67 | 기준모양 : this.a == 1 |
| 136 | ---다음은 기출변형 표이다.--- | |
| 137 | 68 | ||<table bgcolor=transparent,transparent> 구분 || this.a || +this.a || -this.a || "this.a" || [this.a] || this['a'] || this["a"] || this[+a] || this[a] || +this['a'] || +this["a"] || |
| 138 | 69 | || ==1[* 단, -this.a 에는 -this.a==-1로 걸어놓음.] || {{{#!if this.a==1 |
| 139 | 70 | 출력}}} || {{{#!if +this.a==1 |
| ... | ... | |
| 171 | 102 | 출력}}} || {{{#!if +this['a']=="1" |
| 172 | 103 | 출력}}} || {{{#!if +this["a"]=="1" |
| 173 | 104 | 출력}}} || |
| 105 | 위의 표는 {{{#!wiki style="display: inline; font-family: monospace;" | |
| 106 | this}}} 함수 안에 {{{#!wiki style="display: inline; font-family: monospace;" | |
| 107 | {{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}}}} 를 포함하여 {{{this}}} 함수 안에 다른 모양을 넣고 테스트를 해보는 표이다. | |
| 108 | {{{#!wiki style="display: inline; font-family: monospace;" | |
| 109 | this\[{{{#orange \+}}}{{{#green 변수명}}}\]}}}과, {{{#!wiki style="display: inline; font-family: monospace;" | |
| 110 | this\[{{{#green 변수명}}}\]}}}도 지원되는지 테스트, this{{{#orange .}}}{{{#green 변수명}}}이 텍스트값으로만 될 수 있는지 테스트. | |
| 174 | 111 | |
| 175 | 결과에서 a=1 문단 참조. | |
| 176 | ||
| 177 | {{{#orange 결론 1 :}}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 112 | * {{{#orange 결론 1 :}}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 178 | 113 | this\[{{{#orange \"}}}{{{#green 변수명}}}{{{#orange \"}}}\]}}}(큰따옴표)은 {{{#!wiki style="display: inline; font-family: monospace;" |
| 179 | 114 | this\[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\]}}}(작은따옴표)와 마찬가지로 텍스트 값으로 출력된다. |
| 180 | ||
| 181 | {{{#orange 결론 2 :}}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 115 | * {{{#orange 결론 2 :}}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 182 | 116 | this\[{{{#orange \+}}}{{{#green 변수명}}}\]}}}, {{{#!wiki style="display: inline; font-family: monospace;" |
| 183 | this\[{{{#green 변수명}}}\]}}}은 실수값으로도 텍스트 값으로도 | |
| 184 | {{{#!wiki style="display: inline; font-family: monospace;" | |
| 117 | this\[{{{#green 변수명}}}\]}}}은 실수값으로도 텍스트 값으로도 계산하기에는 올바른 입력이 아니다. | |
| 118 | {{{#!wiki style="display: inline; font-family: monospace;" | |
| 185 | 119 | this\[{{{#orange \"}}}{{{#green 변수명}}}{{{#orange \"}}}\]}}}를 숫자 값으로 나오게 하고 싶으면 {{{#!wiki style="display: inline; font-family: monospace;" |
| 186 | 120 | {{{#orangered +}}}this\[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\]}}}이나 {{{#!wiki style="display: inline; font-family: monospace;" |
| 187 | 121 | {{{#orangered +}}}this\[{{{#orange \"}}}{{{#green 변수명}}}{{{#orange \"}}}\]}}} 등 알맞게 입력해야 한다. |
| 188 | ||
| 189 | {{{#orange 결론 3 :}}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 122 | * {{{#orange 결론 3 :}}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 190 | 123 | this{{{#orange .}}}{{{#green 변수명}}}}}}은 양식만 잘 맞추면 숫자값으로 또는 텍스트값으로 나오게 할 수 있다. |
| 124 | ||
| 125 | == 변수 a=b, b=1 테스트 == | |
| 126 | 변수 하나를 다른 변수의 포인터(point)로 두고 테스트. | |
| 127 | {{{#!folding [펼치기 · 접기] | |
| 128 | {{{-5 {{{-3 [include(문테스트:If문법/include 대상, a=b, b=1 )]}}}}}}}}} | |
| 129 | ||
| 130 | == 변수 c\= == | |
| 131 | null과 "" 이 어떤 조건에서 되는지 테스트. | |
| 132 | ||<table bgcolor=transparent,transparent> 구분 ||<width=20%> {{{#blue c==null}}} ||<width=20%> {{{#orange c==""}}} ||<width=20%> c=={{{#gray ''(space)''}}} ||<width=20%> c="{{{#gray ''(space)''}}}" || | |
| 133 | || 출력테스트 || {{{#!if c==null | |
| 134 | 출력}}} || {{{#!if c=="" | |
| 135 | 출력}}} || {{{#!if c== | |
| 136 | 출력}}} || {{{#!if c==" " | |
| 137 | 출력}}} || | |
| 138 | ||
| 139 | == this 함수 == | |
| 140 | ===# this \[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\] 관련 테스트 #=== | |
| 141 | this['true']=true 테스트 | |
| 142 | {{{#!if this['true']==true | |
| 143 | 출력 }}} | |
| 144 | ---- | |
| 145 | this['a'] == null 테스트 | |
| 146 | {{{#!if this['a'] == null | |
| 147 | 출력}}} | |
| 148 | ---- | |
| 149 | a=b 테스트 : 아무 변수도 호출하지 않으면 null == null 상태가 된다. | |
| 150 | {{{#!if a==b | |
| 151 | 출력}}} | |
| 152 | ---- | |
| 153 | this['a']=this['b'] 테스트 : 아무 변수도 호출하지 않으면 null == null 상태가 된다. | |
| 154 | {{{#!if this['a']==this['b'] | |
| 155 | 출력}}} | |
| 156 | ---- | |
| 157 | a+b=c 테스트 (먼저 숫자로 출력되는 변수들끼리 덧셈식이 올바르게 작동하는지를 검증하기 위한 테스트이다.) | |
| 158 | {{{#!if a+b==c | |
| 159 | 출력}}} | |
| 160 | ---- | |
| 161 | this['a']+this['b']=this['c'] 테스트 | |
| 162 | {{{#!if this['a']+this['b']==this['c'] | |
| 163 | 출력}}} | |
| 164 | ---- | |
| 165 | +a+b=+c 테스트 : 아무 변수도 호출하지 않으면 nullnull == null 형식이 되는 것으로 추정된다. | |
| 166 | {{{#!if +a+b==+c | |
| 167 | 출력}}} | |
| 168 | ---- | |
| 169 | (+a)+(+b)=+c 테스트 : 숫자값으로 연산하고자 +를 선언했으므로 괄호로 엮어야 한다. | |
| 170 | {{{#!if (+a)+(+b)==+c | |
| 171 | 출력}}} | |
| 172 | ---- | |
| 173 | +this['a']+this['b']=+this['c'] 테스트 : 변수 호출하지 않으면 ++=상태가 된다. | |
| 174 | {{{#!if +this['a']+this['b']==+this['c'] | |
| 175 | 출력}}} | |
| 176 | ---- | |
| 177 | (+this['a'])+(+this['b'])=+this['c'] 테스트 : 변수 호출하지 않으면 ++=상태가 된다. | |
| 178 | {{{#!if (+this['a'])+(+this['b'])==+this['c'] | |
| 179 | 출력}}} | |
| 180 | ||
| 181 | {{{#orange 결론 : }}} {{{#!wiki style="display: inline; font-family: monospace;" | |
| 182 | this\[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\]}}}는 텍스트 값으로 출력된다. | |
| 191 | 183 |