r28
r1
1[[분류:테스트]][[분류:나무마크 문법]]
2[[../|상위 문서]]
r3
3[[../include 결과|결과 보기]]
r1
4== 변수 a=1 ==
r28
5기본형식 : a==1
6||<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@= ||
7|| ==1[* 단, -a= 열에는 if 조건문을 -a==-1 으로 걸어놓음.] || {{{#!if a==1
8출력}}} || {{{#!if +a==1
9출력}}} || {{{#!if -a==-1
10출력}}} || {{{#!if 'a'==1
11출력}}} || {{{#!if "a"==1
12출력}}} || {{{#!if [a]==1
13출력}}} || {{{#!if [a==1]
14출력}}} || {{{#!if calc(a)==1
15출력}}} || {{{#!if calc(+a)==1
16출력}}} || {{{#!if calc[a]==1
17출력}}} || {{{#!if calc[+a]==1
18출력}}} || {{{#!if calc['a']==1
19출력}}} || {{{#!if @a@==1
20출력}}} ||
21|| =='1' || {{{#!if a=='1'
22출력}}} || {{{#!if +a=='1'
23출력}}} || {{{#!if -a=='1'
24출력}}} || {{{#!if 'a'=='1'
25출력}}} || {{{#!if "a"=='1'
26출력}}} || {{{#!if [a]=='1'
27출력}}} || {{{#!if [a=='1']
28출력}}} || {{{#!if calc(a)=='1'
29출력}}} || {{{#!if calc(+a)=='1'
30출력}}} || {{{#!if calc[a]=='1'
31출력}}} || {{{#!if calc[+a]=='1'
32출력}}} || {{{#!if calc['a']=='1'
33출력}}} || {{{#!if @a@=='1'
34출력}}} ||
35|| =="1" || {{{#!if a=="1"
36출력}}} || {{{#!if +a=="1"
37출력}}} || {{{#!if -a=="1"
38출력}}} || {{{#!if 'a'=="1"
39출력}}} || {{{#!if "a"=="1"
40출력}}} || {{{#!if [a]=="1"
41출력}}} || {{{#!if [a=="1"]
42출력}}} || {{{#!if calc(a)=="1"
43출력}}} || {{{#!if calc(+a)=="1"
44출력}}} || {{{#!if calc[a]=="1"
45출력}}} || {{{#!if calc[+a]=="1"
46출력}}} || {{{#!if calc['a']=="1"
47출력}}} || {{{#!if @a@=="1"
48출력}}} ||
49|| ==\\1 || {{{#!if a==\1
50출력}}} || {{{#!if +a==\1
51출력}}} || {{{#!if -a==\1
52출력}}} || {{{#!if 'a'==\1
53출력}}} || {{{#!if "a"==\1
54출력}}} || {{{#!if [a]==\1
55출력}}} || {{{#!if [a==\1]
56출력}}} || {{{#!if calc(a)==\1
57출력}}} || {{{#!if calc(+a)==\1
58출력}}} || {{{#!if calc[a]==\1
59출력}}} || {{{#!if calc[+a]==\1
60출력}}} || {{{#!if calc['a']==\1
61출력}}} || {{{#!if @a@==\1
62출력}}} ||
r4
63
r28
64== 변수 b=text ==
65||<table bgcolor=transparent,transparent> 구분 || @@_@b@= ||
66|| =text || {{{#!if @b@==text
67출력}}} ||
68|| =text{{{#gray ''(space)''}}} || {{{#!if @b@== text
69출력}}} ||
r4
70
r28
71== 변수 c\= ==
r5
72null과 "" 다름 테스트.
73
r28
74||<table bgcolor=transparent,transparent> 구분 || c= ||
75|| =null || {{{#!if c==null
76출력}}} ||
77|| ="" || {{{#!if c==""
78출력}}} ||
79|| ={{{#gray ''(space)''}}} || {{{#!if c==
80출력}}} ||
81|| c="{{{#gray ''(space)''}}}" || {{{#!if c==" "
82출력}}} ||
r8
83
r18
84== this 함수 ==
85===# this \[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\] #===
r8
86this['true']=true 테스트
87{{{#!if this['true']==true
88출력 }}}
89----
r15
90a=b 테스트 : 아무 변수도 호출하지 않으면 null == null 상태가 된다.
r9
91{{{#!if a==b
r8
92출력}}}
93----
r15
94this['a']=this['b'] 테스트 : 아무 변수도 호출하지 않으면 "" == "" 상태가 된다.
r8
95{{{#!if this['a']==this['b']
96출력}}}
r9
97----
r22
98a+b=c 테스트 (먼저 숫자로 출력되는 변수들끼리 덧셈식이 올바르게 작동하는지를 검증하기 위한 테스트이다.)
r9
99{{{#!if a+b==c
100출력}}}
101----
102this['a']+this['b']=this['c'] 테스트
103{{{#!if this['a']+this['b']==this['c']
r11
104출력}}}
105----
r15
106+a+b=+c 테스트 : 아무 변수도 호출하지 않으면 nullnull == null 형식이 되는 것으로 추정된다.
r11
107{{{#!if +a+b==+c
108출력}}}
109----
r15
110(+a)+(+b)=+c 테스트 : 숫자값으로 연산하고자 +를 선언했으므로 괄호로 엮어야 한다.
r14
111{{{#!if (+a)+(+b)==+c
112출력}}}
113----
r16
114+this['a']+this['b']=+this['c'] 테스트 : 변수 호출하지 않으면 ++=상태가 된다.
r11
115{{{#!if +this['a']+this['b']==+this['c']
r16
116출력}}}
r18
117----
r16
118(+this['a'])+(+this['b'])=+this['c'] 테스트 : 변수 호출하지 않으면 ++=상태가 된다.
119{{{#!if +this['a']+this['b']==+this['c']
r18
120출력}}}
121
r24
122{{{#orange 결론 : }}} {{{#!wiki style="display: inline; font-family: monospace;"
r25
123this\[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\]}}}는 텍스트 값으로 출력된다.
r24
124
r18
125===# this \[{{{#orange \+}}}{{{#green 변수명}}}\] #===
126{{{#!wiki style="display: inline; font-family: monospace;"
127this}}} 함수 안에 {{{#!wiki style="display: inline; font-family: monospace;"
r19
128{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}}}} 이 변수를 텍스트 값으로 부르는 구문이라 가정한다면, {{{#!wiki style="display: inline; font-family: monospace;"
129this}}} 함수 안에 다른 모양을 넣고 테스트를 해보는 문단이다.
130이 문단에서는 {{{#!wiki style="display: inline; font-family: monospace;"
131this\[{{{#orange \+}}}{{{#green 변수명}}}\]}}} 형식을 테스트해본다.
r18
132----
133if this[+a]=1 테스트
134{{{#!if this[+a]==1
135출력}}}
136----
137if this[+a]='1' 테스트
138{{{#!if this[+a]=='1'
139출력}}}
140----
141if this[+a]="1" 테스트
142{{{#!if this[+a]=="1"
143출력}}}
144----
145if this[-a]=-1 테스트
146{{{#!if this[-a]==-1
147출력}}}
148
r21
149a=1 입력부분 결과를 보면 위의 식 4개 어디에도 출력이 나오지 않는다.
150
151{{{#orange 결론}}} : 실수값으로도 텍스트 값으로도 일치하지 않는 점에서 {{{#!wiki style="display: inline; font-family: monospace;"
152this\[{{{#orange \+}}}{{{#green 변수명}}}\]}}}은 올바른 입력이 아니다.
153
154===# this \[{{{#green 변수명}}}\] #===
155이 문단에서는 {{{#!wiki style="display: inline; font-family: monospace;"
156this\[{{{#green 변수명}}}\]}}} 형식을 테스트해본다.
157----
158if this[a]=1 테스트
159{{{#!if this[a]==1
160출력}}}
161----
162if this[a]='1' 테스트
163{{{#!if this[a]=='1'
164출력}}}
165----
166if this[a]="1" 테스트
167{{{#!if this[a]=="1"
168출력}}}
r22
169
170a=1 입력부분 결과를 보면 위의 식 3개 어디에도 출력이 나오지 않는다.
171
172{{{#orange 결론}}} : 실수값으로도 텍스트 값으로도 일치하지 않는 점에서 {{{#!wiki style="display: inline; font-family: monospace;"
r23
173this\[{{{#green 변수명}}}\]}}}도 올바른 입력이 아니다.
174
175===# this \[{{{#orange \"}}}{{{#green 변수명}}}{{{#orange \"}}}\] #===
176작은따옴표로 된다면 큰따옴표로는 되는지 테스트.
177if this["a"]=1 테스트
178{{{#!if this["a"]==1
179출력}}}
180----
181if this["a"]='1' 테스트
182{{{#!if this["a"]=='1'
183출력}}}
184----
185if this["a"]="1" 테스트
186{{{#!if this["a"]=="1"
r24
187출력}}}
188
189a=1 입력부분 결과를 보면 텍스트 값으로 출력이 나온다.
190
191{{{#orange 결론 :}}} {{{#!wiki style="display: inline; font-family: monospace;"
r25
192this\[{{{#orange \"}}}{{{#green 변수명}}}{{{#orange \"}}}\]}}}은 {{{#!wiki style="display: inline; font-family: monospace;"
r26
193this\[{{{#orange \'}}}{{{#green 변수명}}}{{{#orange \'}}}\]}}}와 마찬가지로 텍스트 값으로 출력된다.
194
r28
195=== this{{{#orange .}}}{{{#green 변수명}}} 테스트 ===
r26
196텍스트값으로만 될 수 있는지 테스트.
197
198기준모양 : this.a == 1
199---다음은 기출변형 표이다.---
r28
200||<table bgcolor=transparent,transparent> 구분 || this.a || +this.a || -this.a || "this.a" || [this.a] ||
201|| ==1[* 단, -this.a 에는 -this.a==-1로 걸어놓음.] || {{{#!if this.a==1
r26
202출력}}} || {{{#!if +this.a==1
r27
203출력}}} || {{{#!if -this.a==-1
r26
204출력}}} || {{{#!if "this.a"==1
205출력}}} || {{{#!if [this.a]==1
206출력}}} ||
r28
207|| =='1' || {{{#!if this.a=='1'
r26
208출력}}} || {{{#!if +this.a=='1'
r27
209출력}}} || {{{#!if -this.a=='1'
r26
210출력}}} || {{{#!if "this.a"=='1'
211출력}}} || {{{#!if [this.a]=='1'
212출력}}} ||
r28
213|| =="1" || {{{#!if this.a=="1"
r26
214출력}}} || {{{#!if +this.a=="1"
r27
215출력}}} || {{{#!if -this.a=="1"
r26
216출력}}} || {{{#!if "this.a"=="1"
217출력}}} || {{{#!if [this.a]=="1"
218출력}}} ||
r27
219
220결과에서 a=1 문단 참조.
221{{{#orange 결론 :}}} {{{#!wiki style="display: inline; font-family: monospace;"
222this{{{#orange .}}}{{{#green 변수명}}}}}}은 양식만 잘 맞추면 숫자값으로 또는 텍스트값으로 나오게 할 수 있다.
r26
223