mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
feat: add examples of functions without parenthesis
This commit is contained in:
1 parent
b5e1c92ad1
commit
c56683d28d
1 file changed
+15
@@ -315,6 +315,21 @@ doAction('write', "Shirley", "Abed")
|
||||
--> Doing 'write' to Shirley Abed
|
||||
```
|
||||
|
||||
You can omit parentheses if the argument is one string or table literal
|
||||
|
||||
```lua
|
||||
print "Hello World" --> print("Hello World")
|
||||
|
||||
dofile 'a.lua' --> dofile ('a.lua')
|
||||
|
||||
print [[a multi-line --> print([[a multi-line
|
||||
message]] message]])
|
||||
|
||||
f{x=10, y=20} --> f({x=10, y=20})
|
||||
|
||||
type{} --> type({})
|
||||
```
|
||||
|
||||
## Data Type APIs
|
||||
|
||||
### Strings
|
||||
|
||||
Reference in new issue
Block a user