如果我必须定义下面列出的变量,我可以使用 ''' 来使我的工作正常
def MainTable = '''
0S : MAKE-CALL
0# : MAKE-CALL
00 : MAKE-CALL
(=Emergency) : EMERGENCY-CALL(sip: "911 =domain =dialPhone)
(=N11) : MAKE-CALL(sip: #1v =domain =dialString)
(=SpeedDial) : MAKE-CALL(sip: #1v =domain =dialString)
(=PhoneNumber) : MAKE-CALL(sip: #1v =domain =dialPhone)
(=ImmediateVSCs) : RETURN
(=DelayedVSCs) : RETURN
(x{1-20})S : MAKE-CALL(sip: #1 =domain =dialPhone)
(x{1-20})# : MAKE-CALL(sip: #1 =domain =dialPhone)''';
如果我使用单引号这样定义相同的变量,则会引发错误
def MainTable = '
0S : MAKE-CALL
0# : MAKE-CALL
00 : MAKE-CALL
(=Emergency) : EMERGENCY-CALL(sip: "911 =domain =dialPhone)
(=N11) : MAKE-CALL(sip: #1v =domain =dialString)
(=SpeedDial) : MAKE-CALL(sip: #1v =domain =dialString)
(=PhoneNumber) : MAKE-CALL(sip: #1v =domain =dialPhone)
(=ImmediateVSCs) : RETURN
(=DelayedVSCs) : RETURN
(x{1-20})S : MAKE-CALL(sip: #1 =domain =dialPhone)
(x{1-20})# : MAKE-CALL(sip: #1 =domain =dialPhone)';
1 compilation error:
unexpected char: ''' at line: 1, column: 17
如何使用单引号使用 MainTable 变量,我不想将所有内容放在一行中