文字字符串[Lua 5.1] [英] Literal Strings [Lua 5.1]
问题描述
所以我开始学习Lua(5.1),我看到了叫做文字字符串的东西.我不知道这些怎么办.手册上说\ a是铃铛,但是当我键入
So I started to learn Lua(5.1) and I saw that thing called literal strings. And I have no idea what these do. The manual says \a is a bell but when I type
print('hello\athere')
IDE将打印一个奇怪的正方形,上面写有"bel". 因此,如果有人可以帮助我并解释其中的每一个[字串].那真的很有帮助.
The IDE prints a weird square with 'bel' written on it. So if someone could help me and explain every one of them[Literal Strings]. that would be really helpful.
p.s.我使用Sublime Text 3
p.s. i use Sublime Text 3
推荐答案
0x20和0x7E
之间的ASCII ="nofollow">可打印字符.如何输出其他字符(包括'\a'
和'\b'
)取决于实现.
Only ASCII between 0x20
and 0x7E
are printable characters. How other characters are output, including '\a'
and '\b'
, is up to the implementation.
'\a'
(用于BEL
的ASCII 7
)用于警报.当输出'\a'
时,典型的终端会发出听觉或视觉警报.您的IDE选择显示除警报以外的其他输出.没关系,因为这取决于实现.
'\a'
, the ASCII 7
for BEL
, is designed to be used to alert. Typical terminal would make an audible or visible alert when outputing '\a'
. Your IDE choose to show a different output other than an alert. That's OK since it's up to the implementation.
这篇关于文字字符串[Lua 5.1]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!