Difference between revisions of "Macro Constants"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | <languages /> | ||
<!-- GIDEROSOBJ:Macro Constants --> | <!-- GIDEROSOBJ:Macro Constants --> | ||
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> |
Revision as of 09:59, 3 September 2018
Supported platforms:
Available since: Gideros 2017.10
Description
Macro Constants can be used for string and numeric constants.
Just use @ rather than = when defining the macro.
You can use any of these delimiters after @ but they must be used in pairs. Numbers are auto-detected.
\`~ ! # $ % ^ & * / + = |
Examples
Simple examples
pi@3.14159265358979324
num1 @ -100.54
num2 @ 232
num3 @ 444.10
str1 @ 'hello'
str2 @ "world"
str3 @ [[
Hello,
world!
]]
Commenting out the print command
print @ |--|
print(x, y, z, x + y, y * z) -- this line will be skipped
Methods |
EventsConstants |