Difference between revisions of "Print"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Available since:''' Gideros 2011.6<br/>
=== <translate>Description</translate> ===
+
'''Class:''' [[(global)]]<br/>
<translate>Receives any number of arguments, and prints their values to [[Special:MyLanguage/stdout|stdout]], using the [[Special:MyLanguage/tostring|tostring]] function to convert them to strings. print is not intended for formatted output, but only as a quick way to show a value, typically for debugging. For formatted output, use [[Special:MyLanguage/string.format|string.format]].</translate>
+
 
<source lang="lua">
+
=== Description ===
print(e1,e2,...)
+
Receives any number of arguments, and prints their values to ''stdout'' using the [[tostring]] function to convert them to strings.
</source>
+
<syntaxhighlight lang="lua">
=== <translate>Parameters</translate> ===
+
print(e1,e2,...)
'''e1''': (any) <translate>any argument</translate> <br/>
+
</syntaxhighlight>
'''e2''': (any) <translate>any second argument</translate> '''optional'''<br/>
+
 
'''...''': (any) <translate>other optional arguments</translate> '''optional'''<br/>
+
''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<br/>
 +
'''e2''': (any) any second argument '''optional'''<br/>
 +
'''...''': (any) other optional arguments '''optional'''<br/>
 +
 
 +
{{(global)}}

Latest revision as of 14:32, 13 July 2023

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