1
Tcl에서 우리는 특수 문자를 이스케이프하고 긴 명령을 여러 라인에 분산시키기 위해 백 슬래시를 사용합니다. 너무 그래서Tcl에서 백 슬래시 - 뉴 라인 시퀀스 사용하기
set some_Variable_here 1
if { $some_Variable_here == 1 } \
{
puts "it is equal to 1"
} \
else {
puts "it is not equal to 1"
}
다음과 같이
예를 들어, 일반적인 if
루프가
set some_Variable_here 1
if { $some_Variable_here == 1 } {
puts "it is equal to 1"
} else {
puts "it is not equal to 1"
}
과 같이 쓸 수있다, 우리가 만들 수 있습니다 백 슬래시, 쓸 수있다 명령문은 마치 같은 줄에있는 것처럼 취급해야합니다.
내가 큰 따옴표 또는 중괄호 시도 할 경우, 위의 하나 일 것 같은
set x Albert\ Einstein;# This works
puts $x
#This one is not working
set y Albert\
Einstein
아래처럼 작성할 수 set
문
을 고려할 수 있습니다. 그래서 큰 따옴표 나 중괄호가없는 백 슬래시를 사용하여 개행 문자를 이스케이프 할 수 있습니까?
감사합니다. Donal. :) – Dinesh