Gentee Programming Language > Documentation > Syntax | Download documentation |
Global variables are declared by using the global command. All necessary variables defined within the block follow the global command. You can put variables of the same type together in a single line; first, you specify a type name, which is followed by variable names separated by either a comma or a space. When variable arrays are defined, dimensions and the item type followed the keyword of can be determined. Moreover, the built-in type variables as well as strings and binary data may be initialized at the same time they are declared, using the assignment character '='. You may use the global variable from the time of its declaring.
<array declaration> ::= ['['<natural number> { [','] <natural number>} ']'] [of <type name>]
<global variable declaration> ::= <variable name> [<array declaration>]['=' <constant> ]
<global variable declaration> ::= <type name><global variable declaration> {[','] <global variable declaration>}<end-of-line>
<global> ::= global '{' {<global variable declaration>} '}'
global
{
str a b = "My string", c
uint num = 25, num2
arr x[ 10 ] of int
}
See also
![]() |
![]() Copyright © 2004-2006 Gentee Inc. All rights reserved. ![]() |