Gentee Programming Language > Documentation > Syntax Download documentation

The public command, the private command

All functions, metods, types or other elements of the Gentee language become publicly available by default after they have been defined. Take advantage of the private command in order to make elements be accessible only within the file, where they have been defined. All language elements that follow this command, will be accessible before the current .g file has compiled. After that, names of these elements will be deleted, you will be unable to find the elements by specifying their names. The public command makes the next elements be publicly available. You can use either public or private in the source as necessary.


private

func str mylocal
{
...
}

public

func str myfunc
{
...
mylocal()
...
}

These commands are likely to be used for the (func) functions, the (method) methods, the (operator) operators, the (type) types, the (global) global variables.

<public> ::= public
<private> ::= private


 Copyright © 2004-2006 Gentee Inc. All rights reserved.