Difference between revisions of "Macro Functions"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2017.10<br/> === Description === <br /> Macro Functions receive a list of tokens and output a string...")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Available since:''' Gideros 2017.10<br/>
 
'''Available since:''' Gideros 2017.10<br/>
 
=== Description ===
 
=== Description ===
Line 19: Line 19:
  
  
 +
 +
 
 +
 
 +
 
 +
 
 +
 +
 
 +
 +
 
 +
 +
 
 
{|-
 
{|-
 
| style="width: 50%;"|
 
| style="width: 50%;"|

Revision as of 09:57, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2017.10

Description


Macro Functions receive a list of tokens and output a string which will be pasted into code at compile time.

name @ (| ...body... |)

You should use parenthesis around markers - '|' is the preferred marker. The same marker should be used to close macro body with closing parenthesis right after it. You can use any of these markers.
\`~ ! # $ % ^ & * / + = |

You can redefine a macro with @@.
name @@ (| ...another_body... |)

To call macro function use it's name with parenthesis as with usual functions:
name(...arguments...)







Methods

Events

Constants