- Lua Quick Start Guide
- Gabor Szauer
- 101字
- 2021-08-05 10:30:37
String literals
A string literal must be written between quotes. The following line of code demonstrates a string literal. This example does not do anything since the literal is a value that is never assigned to a variable:
"hello, world"
Without being assigned to a variable, this string can't be printed. String literals don't have to be assigned to a variable to be useful; they can be passed directly to a function such as print. The following code demonstrates both of these cases:
print ("Print a string literal, used in place")
message = "Print a string assigned to a variable"
print(message)
推薦閱讀
- Dynamics 365 for Finance and Operations Development Cookbook(Fourth Edition)
- 自制編譯器
- Android和PHP開發最佳實踐(第2版)
- Getting Started with CreateJS
- TypeScript實戰指南
- 深度學習:算法入門與Keras編程實踐
- JavaScript:Moving to ES2015
- Scala編程實戰(原書第2版)
- Learning Unreal Engine Android Game Development
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- 大學計算機基礎實驗指導
- ABAQUS6.14中文版有限元分析與實例詳解
- 深入大型數據集:并行與分布化Python代碼
- Implementing Domain:Specific Languages with Xtext and Xtend
- Eclipse開發(學習筆記)