r2608
r2597
1[[분류:냥]]
r2584
2{{{#!wiki style="font-weight: 300; font-size: 20px"
3{{{#!if 식 = '11+2'
r2597
4@식=11+2@}}} = {{{#!if s1=false, s2=false, s3=false, j=1+0, i=0+0, k=1+0
r2593
5##switch1 : 숫자 계속 탐색하기, switch2 : 소수점 아래 기입하기. switch3 : 중복 실행 방지.
r2594
6}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
r2593
7}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
r2594
8##숫자를 발견할 경우
r2591
9{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
r2595
10##여기에 앞자리가 음수냐 아니냐를 읽는 판별을 만들어야 합니다. ㅏ 이걸 생각 못했네요 그럼 좀 많이 길어지는데
r2591
11}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
12##숫자를 계속 발견할 경우 (소수점일 수도 있습니다. 여기서는 숫자일 경우)
r2592
13##여기에서 소수점 위를 기입하냐 소수점 아래를 기입하냐 소수점 아래라면 소수점 아래 몇번째 자리를 기입하느냐를 적어야 합니다.
r2597
14{{{#!if s2==false
15##정수 자리를 기입하는 경우
r2595
16{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
r2597
17}}}}}}{{{#!if s2==true
18##소수점 아래 자리를 기입하는 경우
19{{{#!if this['v'+j] = this['v'+j]+(10.0**(-k))*(+(식.substr(i,1))), s3=true
20}}}{{{#!if k+=1
21##다음 소수점 자리 찾기
r2602
22}}}}}}}}}{{{#!if (s1==true)&&(s2==false)&&(식[i]==46)&&(s3==false)
r2605
23##앞에서 숫자를 발견한 다음 소수점을 발견할 경우 (소수점 발견은 최초 1회에 한함)
r2597
24{{{#!if s2=true, s3=true, k=1+0
25##switch2 : 켜기
r2607
26}}}}}}{{{#!if (s1==true)&&(((s2==false)&&!this['d'+i]&&(식[i]!=46))||((s2==true)&&!this['d'+i]))&&(s3==false)
27##숫자가 더 이상 나오지 않고 소수점을 발견하지 못했을 경우, 소수점을 발견한 상황인데 숫자가 나오지 않을 경우 (소수점이 다시 나오는 경우가 자동적으로 포함)
r2591
28{{{#!if j+=1, s1=false, s2=false, s3=true
r2592
29##소수점 아래 기입하는 스위치도 off, 다음 index(j) 매김.
r2597
30}}}{{{#!if s3==true
31##여기까지 과정을 거쳤다면 스위치 off.
32{{{#!if s3=false
33}}}}}}
34}}}{{{#!if i+=1
r2594
35}}}
r2595
36##
r2599
37{{{#!if false
r2600
38##이 if문은 실행되지 않는 단락. 주석만 제거하고 복사 붙여넣기.
r2599
39{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
40}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
41{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
42}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
43{{{#!if s2==false
44{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
45}}}}}}{{{#!if s2==true
46{{{#!if this['v'+j] = this['v'+j]+(10.0**(-k))*(+(식.substr(i,1))), s3=true
47}}}{{{#!if k+=1
r2603
48}}}}}}}}}{{{#!if (s1==true)&&(s2==false)&&(식[i]==46)&&(s3==false)
r2599
49{{{#!if s2=true, s3=true, k=1+0
r2604
50}}}}}}{{{#!if (s1==true)&&(((s2==false)&&!this['d'+i]&&(식[i]!=46)||(s2==false))||((s2==true)&&!this['d'+i]&&(식=[i]==46)))&&(s3==false)
r2599
51{{{#!if j+=1, s1=false, s2=false, s3=true
52}}}{{{#!if s3==true
53{{{#!if s3=false
54}}}}}}
55}}}{{{#!if i+=1
56}}}
57####
58}}}
59##
r2600
60{{{#!if this['v1'] == 1
61this['v1'] == 1}}}
62##
63{{{#!if s3=false
64}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
65}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
66{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
67}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
68{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
69}}}}}}{{{#!if (s1==true)&&(식[i]==46)&&(s3==false)
70{{{#!if s2=true, s3=true
71}}}}}}{{{#!if (s1==true)&&!this['d'+i]&&(s3==false)
72{{{#!if j+=1, s1=false, s2=false, s3=true
73}}}}}}{{{#!if i+=1
74}}}
75##
r2595
76{{{#!if this['v1'] == 11
77this['v1'] == 11}}}
78##
r2596
79{{{#!if s3=false
80}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
81}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
82{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
83}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
84{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
85}}}}}}{{{#!if (s1==true)&&(식[i]==46)&&(s3==false)
86{{{#!if s2=true, s3=true
87}}}}}}{{{#!if (s1==true)&&!this['d'+i]&&(s3==false)
88{{{#!if j+=1, s1=false, s2=false, s3=true
89}}}}}}{{{#!if i+=1
90}}}{{{#!if s3=false
91}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
92}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
93{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
94}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
95{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
96}}}}}}{{{#!if (s1==true)&&(식[i]==46)&&(s3==false)
97{{{#!if s2=true, s3=true
98}}}}}}{{{#!if (s1==true)&&!this['d'+i]&&(s3==false)
99{{{#!if j+=1, s1=false, s2=false, s3=true
100}}}}}}{{{#!if i+=1
101}}}
r2595
102##
r2596
103{{{#!if this['v2'] == 2
104this['v2'] == 2}}}
r2595
105##
106##
107##
108##
r2593
109{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57), i+=1
r2586
110}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57), i+=1
111}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57), i+=1
r2584
112}}}
r2593
113
r2586
114## 식 검증이 됐다 치면
r2587
115## dn : true - 수 / false - 연산자
r2586
116{{{#!if this['d0']
1171}}}{{{#!if this['d1']
1181}}}{{{#!if !this['d2']
119+}}}{{{#!if this['d3']
r2585
1202}}}
r2587
121## in : 11+2 에서 '11'은 0번째 위치, '+'는 2번째 위치.. > 0, 2, 3 > 위치 기억 / 뺄셈으로 자릿수 계산
122## 보다 좋은 방법이 있ㅅ을 것 같은데음ㅁ..
123{{{#!if i = 1, j = 1, i0 = 0
124}}}
r2584
125
r2587
126{{{#!if t = this['d0'] != this['d1'], t
127{{{#!if this['i'+i] = j, j+=1, i+=1
128}}}}}}{{{#!if !t
129{{{#!if j+=1
130}}}}}}{{{#!if t = this['d1'] != this['d2'], t
131{{{#!if this['i'+i] = j, j+=1, i+=1
132}}}}}}{{{#!if !t
133{{{#!if j+=1
134}}}}}}{{{#!if t = this['d1'] != this['d2'], t
135{{{#!if this['i'+i] = j, j+=1, i+=1
136}}}}}}{{{#!if !t
137{{{#!if j+=1
r2585
138}}}}}}
r2584
139
r2608
140## {{{#!if i0 == 0
141## i0 == 0 }}}{{{#!if i1 == 2
142## i1 == 2 }}}{{{#!if i2 == 3
143## i2 == 3 }}}
r2587
144
r2608
145----
146ver2
147{{{#!if 식 = '1.1+2'
148@식=1.1+2@}}} = {{{#!if s1=false, s2=false, s3=false, j=1+0, i=0+0
149##switch1 : 숫자 계속 탐색하기, switch2 : 소수점 기입 여부. switch3 : 중복 실행 방지.
150}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
151}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
152##숫자를 발견할 경우. 첫 번째 자리가 소수점일 경우가 아닐 경우만 생각하기에 s2를 false로 시작.(어차피 문자열당 한 번씩만 들르는 코드임)
153{{{#!if this['v'+j] = 식.substr(i,1), s1=true, s2=false, s3=true
154}}}}}}{{{#!if (s1==true)&&(this['d'+i]||(식[i]==46))&&(s3==false)
155##숫자 혹은 소수점을 계속 발견할 경우 ^^^^^^^^^^^^
156{{{#!if s2==false
157##정수/소수점을 기입하는 경우
158{{{#!if this['v'+j] = this['v'+j]+(식.substr(i,1)), s3=true
159}}}}}}{{{#!if s2==true
160{{{#!if !(식[i]==46)
161##소수점 아래 자리를 기입하는 경우 단, s2가 true인데 (식[i]==46)라면 소수점이 중복으로 나오는 것이니 pass(혹은 나중에 에러처리해도 괜찮을 듯)
162{{{#!if this['v'+j] = this['v'+j]+(식.substr(i,1)), s3=true
163}}}}}}}}}}}}{{{#!if j+=1, s1=false, s2=false, s3=true
164##소수점 아래 기입하는 스위치도 off, 다음 index(j) 매김.
165}}}{{{#!if s3==true
166##여기까지 과정을 거쳤다면 스위치 off.
167{{{#!if s3=false
168}}}}}}
169}}}{{{#!if i+=1
170}}}
r2587
171
r2608
172
r2587
173## {{{#!if list = [d0, d1, d2, d3]
174## }}}
175}}}
r2585
176[include(틀:계산기2, r=13)]
r2582
177##생각해보니까 그냥 r을 지정할 수도 있겠구나
178
r2580
179{{{#!if 0.1 + 0.2 != 0.3
1800.1 + 0.2 '''{{{#red !}}}=''' 0.3}}}
181{{{#!if 1 + 0.1 == 1.1
1821 + 0.1 '''==''' 1.1}}}
r2569
183
r2581
184{{{#!if a=1
185}}}{{{#!if a+=1, a == 2
186asdf}}}
187
r2571
188[include(틀:계산기, a=123456789, f=+, b=1)]
189[include(틀:계산기, a=123456789, f=-, b=1)]
190[include(틀:계산기, a=123459, f=*, b=2)]
191[include(틀:계산기, a=123459, f=/, b=2)]
r2569
192
r2572
193[include(틀:계산기2, a=10, f=/, b=3)]
r2573
194[include(틀:계산기2, a=-5, f=/, b=200)]
195[include(틀:계산기2, a=-5, f=*, b=200)]
r2574
196[include(틀:계산기2, a=123459, f=/, b=2)]
r2575
197[include(틀:계산기2, a=12345, f=-, b=67890)]
r2579
198[include(틀:계산기2, a=-1, f=*, b=-5)]
r2583
199[include(틀:계산기2, a=-3, f=/, b=7)]
r2577
200[include(틀:계산기2, a=1.1, f=+, b=0.1)]
r2578
201아직은 소수끼리의 계산은 되지 않는 모양이다. (사실 그도 그럴 것이 gauss함수를 가져오지 않았기 때문)
r2569
202
r2560
203{{{#!if json={'a':'b', 'c':'d'}
204json={'a':'b', 'c':'d'}[br]
205}}}{{{#!if json['a'] == 'b'
206json['a'] == 'b'[br]
207}}}{{{#!if list = ['a', 'b']
208list = ['a', 'b'][br]
209}}}{{{#!if list[1] == 'b'
210list[1] == 'b'[br]
211}}}
212
r2568
213[[../냥]] < 볼드체. 단, {{{../}}}뒤에 붙는 이름이 자기자신과 같은 이름이면 볼드체, 다른 이름(예 : [[../냥냥]], [[../냥/냥]])이면 볼드체가 아니다. 문서명이 '[[냥/냥|(상위문서명)/냥]]'일 경우에도 볼드체가 된다. 이 문서에는 상위 문서가 없으니 그냥 '냥' 으로 링크되는 듯 하다.
r2559
214[[냥#]] < 볼드체
215[[냥#ㅁㄴㅇㄹ|냥#ㅁㄴㅇㄹ]] < 볼드체아님
r2557
216[[문서:냥]] < 볼드체아님
r2560
217
r2558
218== ㅁㄴㅇㄹ ==
r2114
219
r2128
220[include(a)]''''''[include(a)][include(a)]
r2130
221[[]][include(a)][include(a)][include(a)]
r2127
222
r2118
223'''{{{#!wiki style="width: 80px; height: 80px; color: transparent; background: text linear-gradient(to right bottom, #9a8ef2 15%, transparent 55%), text linear-gradient(to left bottom, #cb83c4 15%, transparent 55%), text linear-gradient(to right top, #fd6e77 15%, transparent 75%),text linear-gradient(to left top, #ed9861 15%, transparent 75%)"
224asdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdf}}}'''
r2114
225
r2112
226[include(틀:각주, 각주명=각주명에 띄어쓰기 넣기, 내용=[include(틀:각주\, 각주명=각주명에 띄어쓰기 넣기\, 내용=\)])]
r2110
227
r2111
228{{{#!wiki style="background: skyblue; margin: 0 auto; padding: 5px; max-width: 500px"
r2105
229||<tablealign=center><tablewidth=100%><tablebordercolor=transparent><tablebgcolor=red><bgcolor=#000>||
230
r2109
231||<tablealign=center><tablewidth=100%><tablebordercolor=transparent><tablebgcolor=red><rowbgcolor=#000>||
232||<colbgcolor=#000>||
r2108
233||<tan>||
r2106
234
r2107
235||<tablealign=center><tablewidth=100%><bgcolor=#000>||
236
237||<tablealign=center><tablewidth=100%>||}}}
r2095
238Mozilla/5.0 (compatible; Daum/1.0; +http://ws.daum.net/aboutkr.html) ok
r2096
239Mozilla/5.0 (compatible; coccocbot-web/1.0; +http://help.coccoc.com/web) ok
r2104
240\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961)]
241[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961)]
r2075
242----
r2104
243\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961, uuid=2d701244-1d84-4716-8717-e0756914096d)]
244[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961, uuid=2d701244-1d84-4716-8717-e0756914096d)]
r2075
245----
r2104
246\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=-1, UUID=2d701244-1d84-4716-8717-e07569140961)]
247[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=-1, UUID=2d701244-1d84-4716-8717-e07569140961)]
r2075
248----
r2104
249\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=)]
250[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=)]
r2077
251----
r2104
252\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e0756914096x)]
253[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e0756914096x)]
r2075
254----
r2104
255\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961)]
256[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961)]
r2075
257----
r2104
258\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e0756914096x)]
259[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e0756914096x)]
r2075
260----
r2104
261\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961, UUID=2d701244-1d84-4716-8717-e07569140961)]
262[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961, UUID=2d701244-1d84-4716-8717-e07569140961)]
r2076
263----
r2068
264\[include(틀:isuuid, uuid=1dd4a127-1b8d-4788-8cea-9ff8b1ddd06e)]
r2062
265[include(틀:isuuid, uuid=1dd4a127-1b8d-4788-8cea-9ff8b1ddd06e)]
r2075
266----
r2068
267\[include(틀:isuuid, uuid=xdd4a127-1b8d-4788-8cea-9ff8b1ddd0xx)]
r2064
268[include(틀:isuuid, uuid=xdd4a127-1b8d-4788-8cea-9ff8b1ddd0xx)]
r2068
269\[include(틀:isuuid, uuid=냥)]
270[include(틀:isuuid, uuid=냥)]
r2580
271[include(틀:ㅁ, str=Hello\, World!)]
272toString() 가능
273parseInt() x