Difference between revisions of "Print"

From GiderosMobile
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Receives any number of arguments, and prints their values to ''stdout'' using the [[tostring]] function to convert them to strings.
 
Receives any number of arguments, and prints their values to ''stdout'' using the [[tostring]] function to convert them to strings.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
print(e1,e2,...)
 
print(e1,e2,...)
</source>
+
</syntaxhighlight>
  
 
''print'' is not intended for formatted output, but only as a quick way to show a value, typically for debugging.
 
''print'' is not intended for formatted output, but only as a quick way to show a value, typically for debugging.
Line 19: Line 19:
 
'''e2''': (any) any second argument '''optional'''<br/>
 
'''e2''': (any) any second argument '''optional'''<br/>
 
'''...''': (any) other optional arguments '''optional'''<br/>
 
'''...''': (any) other optional arguments '''optional'''<br/>
 +
 +
=== See also ===
 +
'''https://luau.org/library#global-functions'''<br/>
  
 
{{(global)}}
 
{{(global)}}

Latest revision as of 12:22, 21 July 2025

Available since: Gideros 2011.6
Class: (global)

Description

Receives any number of arguments, and prints their values to stdout using the tostring function to convert them to strings.

print(e1,e2,...)

print is not intended for formatted output, but only as a quick way to show a value, typically for debugging.

Logs are sent to Gideros Studio when the app is a Gideros Player, and to system dependent logging facility otherwise (ie. Android logcat).

For formatted output, use string.format.

Parameters

e1: (any) any argument
e2: (any) any second argument optional
...: (any) other optional arguments optional

See also

https://luau.org/library#global-functions