@INCLUDE file$
file$ into the current project. The code will be inserted into the
current project at the position where @INCLUDE is defined. Normally,
you will want to use @INCLUDE at the beginning of your project.
This preprocessor command is useful if you have larger projects and want to spread them over multiple files. The included files usually contain functions that you can call then from your main script. Included files can also contain preprocessor commands.
Starting from Hollywood 4.0, you can also include Hollywood applets using this command. This is useful for importing code from libraries.
See Include files for details.
;---File: script2.hws---
Function p_Print(t$)
Print(t$)
EndFunction
;EOF script2.hws
;---File: mainscript.hws
@INCLUDE "script2.hws"
p_Print("Hello World!")
WaitLeftMouse
End
;EOF mainscript.hws
The code above consists of two scripts: script2.hws contains the function
p_Print() which simply calls Hollywood's Print() function. script2.hws
is then included in the main script which also calls the p_Print() function
then.