How to program in Grimport?

Ask us for help with programming in Grimport TRANSLATE THIS PAGE WITHOUT TOUCHING THE CODES

To Go Further

 

Import a script


With Grimport, it is possible to import a script into another script.
You can do this import anywhere in the script (not just at the beginning) with these two functions: importScript() and importFile(). The code returns true if the script is imported.


Example (with importScript):

setGlobal("changeSomeValues",true) 
changePerson="Frederic"  
executeThat = 
{->  
	console("Welcome!") 
}

importScript( 387538 ) // -> Welcome! // -> Hello, I am Frederic

The script 387538 :

person="Jack"

if(get(global, "changeSomeValues")) { person=changePerson executeThat() } console("Hello, I am " + person)

 

Example (with importFile):

importFile( path("desktop")+"Grimport scripts/myScript.grimport" )

 

 

 

 

 

 

 

 

 

 

 

 

 


Next ❯ ❮ Previous