| r52 vs r53 | ||
|---|---|---|
| 1 | 1 | [[분류:냥]][Include(틀:상세 내용, 설명대상=원본, 문서명=틀\:계산기)] |
| 2 | 2 | == 2-2 == |
| 3 | 3 | {{{#!wiki style="font-weight: 300; font-size: 20px" |
| 4 | ##as : a value to string; bs : b value to string; al : a string length; bl : string length | |
| 5 | ##a | |
| 6 | {{{#!if this.as=a.upString(), this.bs=b.upString() | |
| 7 | }}}{{{#!if this.al=as.length, this.bl=bs.leg | |
| 8 | }}}{{{#!if a | |
| 9 | {{{#!if this.au=as.substr(0,ap), this.ab=as.substr(ap+1, al-ap-1) | |
| 10 | }}}}}}{{{#!if a | |
| 11 | {{{#!if this.au=as, ab="" | |
| 12 | }}}}}}{{{#!if b | |
| 13 | {{{#!if this.bu=bs.substr.(0,bp), this.bb=bs.substr(bp+1, bl-bp-1) | |
| 14 | }}}}}}}}}{{{#!if b | |
| 15 | {{{#!if this.bu=bs, bb="" | |
| 4 | ##as : "a" value to string; bs : "b" value to string; al : "a" string length; bl : "b" string length | |
| 5 | ##ad : "a" decimal point; bd : "b" decimal point; au : --gold-- "a" upper value (integer); bu : "b" upper value (integer); | |
| 6 | ##ab : "a" below value (integer); bb : "b" below value (integer); ap : "a" places of decimal; bp : "b" places of decimal; | |
| 7 | ##ru : result upper value (integer); rb : result below value (integer) | |
| 8 | {{{#!if this.as=a.upString(), this.bs=b.upString(), this.ru=0+0, this.rb=0+0 | |
| 9 | }}}{{{#!if this.al=as.length, this.bl=bs.length, this.ad=as.indexOf("."), this.bd=bs.indexOf(".") | |
| 10 | }}}{{{#!if ad!=-1 | |
| 11 | {{{#!if this.au=as.substr(0,ap), this.ab=as.substr(ap+1, al-ap-1), this.ap=ab.length | |
| 12 | }}}}}}{{{#!if ad==-1 | |
| 13 | {{{#!if this.au=as, ab="", ap=0+0 | |
| 14 | }}}}}}{{{#!if bd!=-1 | |
| 15 | {{{#!if this.bu=bs.substr.(0,bp), this.bb=bs.substr(bp+1, bl-bp-1), this.bp=bb.length | |
| 16 | }}}}}}}}}{{{#!if bd==-1 | |
| 17 | {{{#!if this.bu=bs, bb="", bp=0+0 | |
| 16 | 18 | }}}}}} |
| 17 | ||
| 19 | ## | |
| 20 | {{{#!if as[0]!=45 | |
| 21 | @a@}}}{{{#!if as[0]==45 | |
| 22 | (@a@)}}}{{{#!if f=='+' | |
| 23 | }}}{{{#!if bs[0]!=45 | |
| 24 | @b@}}}{{{#!if bs[0]==45 | |
| 25 | (@b@)}}} | |
| 18 | 26 | ==# 2-1 #== |
| 19 | 27 | {{{#!wiki style="font-weight: 300; font-size: 20px" |
| 20 | 28 | {{{#!if +a>=0 |
| ... | ... |