Global Requirements

If you want to define a global requirement file you can use the –require parameter. Due to this you can include a genesys extension file (*.gex). In your extension folder you should create folders for your domain (i.e. „pro/genesys“). Let's create an extension named gloablreq.gex

add is code( a, b is int ) := return a+b;

That file you store at extention/your/domain/globalreq.gex within your local work folder.

Now you create your main procedure and put it into your work folder as main.g.

print add( 1, 2 )$;

If you try to run your main procedure by

gsys -r main.g

you got an error:

~/global_requirement$ gsys --require de.xsd.globalreq main.g 
In File 'main.g'
[ Err]: 9/1: identifier 'add' unknown

To successfully run this, you can add an global known requirement:

gsys -r main.g --require your.domain.globalreq

and you should get the correct result:

3