| r216 vs r217 | ||
|---|---|---|
| ... | ... | |
| 18 | 18 | '''rp''' : "result" # of places of decimal (integer); |
| 19 | 19 | '''rs''' : "result" suprerior value (integer→string); '''ri''' : "result" inferior value (integer→string); |
| 20 | 20 | '''i''' : index; '''tu''' : temporary value 1 (integer); '''tv''' : temporary value 2 (integer); '''tw''' : temporary value 3 (integer); '''tx''' : temporary value 4 (integer); '''ty''' : temporary value 5 (integer); |
| 21 | '''ps''' : pass (logical); '''ts''' : --not about gender-- test (logical) | |
| 21 | '''ps''' : pass (logical); '''ts''' : --not about gender-- test (logical) ; '''br''' : break (logical); | |
| 22 | 22 | '''ea''' : error about "a"; '''eb''' : error about "b"; |
| 23 | 23 | '''wa''' : warning about "a" ; '''wb''' : warning about "b" ; |
| 24 | 24 | '''ns''' : negative sign for multiplication and division (string); |
| 25 | {{{#!if this.as=a.toString(), this.bs=b.toString(), this.rs=0+0, this.ru=0+0, this.rb=0+0, this.ri=0+0, this.rp=0+0, this.i=0+0, this.tu=0, this.tv=1, this.tw=0, this.tx=0, this.ty=0, this.ea=0+0, this.eb=0+0, this.wa=0+0, this.wb=0+0, this.ps=false, ns="" | |
| 25 | {{{#!if this.as=a.toString(), this.bs=b.toString(), this.rs=0+0, this.ru=0+0, this.rb=0+0, this.ri=0+0, this.rp=0+0, this.i=0+0, this.tu=0, this.tv=1, this.tw=0, this.tx=0, this.ty=0, this.ea=0+0, this.eb=0+0, this.wa=0+0, this.wb=0+0, this.ps=false, this.ts=false, this.br=false, ns="" | |
| 26 | 26 | }}}{{{#!if this.al=as.length, this.bl=bs.length, this.ad=as.indexOf("."), this.bd=bs.indexOf(".") |
| 27 | 27 | }}}{{{#!if ad!=-1 |
| 28 | 28 | 소수점이 발견되는 자리 번호가 ad이므로 ad+1번에 해당되는 자리부터 끝까지 표기합니다. |
| ... | ... | |
| 95 | 95 | |
| 96 | 96 | (반점(,)을 자동적으로 생략하고 들어가는 것은 나중에 생각하겠습니다.) |
| 97 | 97 | {{{#!if false |
| 98 | ||
| 99 | {{{#!if t | |
| 100 | }}}{{{#!if !t | |
| 101 | {{{#!if br | |
| 102 | }}} | |
| 103 | ||
| 98 | br와 ts 변수를 이용하여 순차적으로 검사를 진행합니다. 도중 문제가 있으면 (br를 true로 반환하고) 오류 코드를 내도록 만듭니다. | |
| 99 | {{{#!if ts=((au[0]!=45)&&(au.length<=18))||((au[0]==45)&&(au.length<=19)) | |
| 100 | }}}{{{#!if !ts&&!br | |
| 101 | {{{#!if br=true, ea=1 | |
| 102 | }}}}}} | |
| 103 | 소수점 윗자릿수가 넘치면 오류코드 1번을 반환합니다. | |
| 104 | {{{#!if ts&&!br | |
| 105 | {{{#!if ts=(as.indexOf(".")==as.lastIndexOf(".")) | |
| 106 | }}}}}}{{{#!if !ts&&!bk | |
| 107 | {{{#!if br=true, ea=5 | |
| 108 | }}}}}} | |
| 109 | 소수점을 2개 이상 입력하면 오류코드 5번을 반환합니다. | |
| 110 | {{{#!if ts&&!br | |
| 104 | 111 | }}} |
| 105 | 112 | {{{#!if !test&&!break |
| 106 | 113 | {{{#!if break=true |
| 107 | }}}온점을 2개 이상 입력했을 경우}}}{{{#!if test&&!break | |
| 108 | 온점이 1개 이하인 경우{{{#!if test=((au[0]!=45)&&(au.length<=18))||((au[0]==45)&&(au.length<=19)) | |
| 109 | }}}}}} | |
| 110 | {{{#!if !test&&!break | |
| 111 | {{{#!if break=true | |
| 112 | 114 | }}}자릿수가 넘은 경우}}}{{{#!if test&&!break |
| 113 | 115 | 자릿수가 넘지 않은 경우{{{#!if this.testtext=au |
| 114 | 116 | }}}{{{#!if rest=(au[0]==45), rest |
| ... | ... | |
| 122 | 124 | 입력하신 문구에서 소수점 윗부분은 숫자가 맞는 경우{{{#!if ab=as.substr(ad+1, as.length-ad-1) |
| 123 | 125 | }}}}}} |
| 124 | 126 | }}} |
| 125 | error code 0 | |
| 127 | error code 05 번 ~ : 입력한 변수는 숫자로 읽을 수 없습니다. | |
| 128 | * 5번 : 반점(,)을 입력했다면 반점을 지우고 다시 입력하세요. | |
| 126 | 129 | |
| 127 | 130 | error code 03 번 : 0으로 나눌 수 없습니다.(아래쪽 참고) |
| 128 | 131 | |
| ... | ... |