| r101 vs r102 | ||
|---|---|---|
| 1 | 1 | [[분류:냥]][Include(틀:상세 내용, 설명대상=원본, 문서명=틀\:계산기)] |
| 2 | 2 | == 2-2 == |
| 3 | = | |
| 3 | {{{#!wiki style="display: none;" | |
| 4 | ##디버그용 if 문법 | |
| 4 | 5 | {{{#!if a= ,b= ,f= |
| 5 | 6 | }}} |
| 6 | 7 | {{{#!wiki style="display: none; display: inline;" |
| ... | ... | |
| 282 | 283 | {{{#!if this.ru=ru.toString(), rb="", rp=0+0 |
| 283 | 284 | }}}}}} |
| 284 | 285 | |
| 286 | rb==0인 경우 rb="", rp=0을 반환합니다. | |
| 287 | {{{#!if +rb==0 | |
| 288 | {{{#!if rb="", rp=0+0 | |
| 289 | }}}}}} | |
| 290 | ||
| 285 | 291 | 여기까지가 덧셈 또는 뺄셈연산의 계산과정입니다. |
| 286 | 292 | }}} |
| 287 | 293 | |
| ... | ... | |
| 299 | 305 | '''rl''' : result string length to output; '''i''' : index; '''p''' : a point of string(s); |
| 300 | 306 | ru는 계산결과에서 소수점 위 자리이므로, dot(.)이 나오지 않습니다. |
| 301 | 307 | ##여기까지 주석(주석 아님) |
| 302 | }}} | |
| 303 | ||
| 304 | {{{#!wiki style="font-weight: 300; font-size: 20px;" | |
| 308 | }}}}}}{{{#!wiki style="font-weight: 300; font-size: 20px;" | |
| 305 | 309 | {{{#!if this.sa=(this.a!="")&&(this.a!=null), this.sb=(this.b!="")&&(this.b!=null), this.sf=(this.f=='+')||(this.f=='-')||(this.f=='*')||(this.f=='/') |
| 306 | 310 | }}}{{{#!if !sa&&!sb&&!sf |
| 307 | 311 | 변수를 입력하세요... |
| 308 | }}}{{{#!if !( | |
| 309 | {{{#!if !sa | |
| 312 | }}}{{{#!if !(sa&&sb&&sf) | |
| 313 | ({{{#!if !sa | |
| 310 | 314 | a{{{#!if !sb||!sf |
| 311 | 315 | , }}}}}}{{{#!if !sb |
| 312 | 316 | b{{{#!if !sf |
| 313 | 317 | , }}}}}}{{{#!if !sf |
| 314 | f}}}를 입력하세요...}}}{{{#!if sa&&sb&&sf | |
| 318 | f}}}를 입력하세요...)}}}{{{#!if sa&&sb&&sf | |
| 315 | 319 | {{{#!if as[0]!=45 |
| 316 | 320 | @a@}}}{{{#!if as[0]==45 |
| 317 | 321 | (@a@)}}}{{{#!if f=='+' |
| ... | ... |