文字字符串[Lua 5.1] [英] Literal Strings [Lua 5.1]

查看:118
本文介绍了文字字符串[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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆