Gentee Programming Language > Documentation > Syntax | Download documentation |
Macros of any fundamental type of the Gentee language are defined by using the define command. To perform macro substitution, you need to specify an expression name surrounded by the dollar signs '$'. If the macro is followed by the character which is unlikely to be used in the name, the final dollar sign '$' is considered to be optional. Actually, macros are not variables; instead, macros are replaced with their values during compilation.
define { a = "str" b = 10 } ... print( "\$a$ing \( $b + 20 )" )
There are the following predefined macros.
$_FILE The full name of the current source file. $_LINE The current line of the source file. $_DATE The current date in the format DDMMYYYY. $_TIME The current time in the format HHMMSS. $_WINDOWS Equals 1 in Windows. $_LINUX Equals 1 in Linux.
![]() |
![]() Copyright © 2004-2006 Gentee Inc. All rights reserved. ![]() |