This shows you the differences between two versions of the page.
el:include [2016/01/01 22:39] |
el:include [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Include ===== | ||
+ | ==== Format ==== | ||
+ | |||
+ | **include** " | ||
+ | |||
+ | ==== Description ==== | ||
+ | |||
+ | Loads an external source file at compile (when the run button is pressed) time into the program. | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | == saved as smilerandom.kbs == | ||
+ | < | ||
+ | include " | ||
+ | clg | ||
+ | while true | ||
+ | call drawsmile(300*rand, | ||
+ | end while | ||
+ | end | ||
+ | </ | ||
+ | == saved as smilesubroutine.kbs == | ||
+ | < | ||
+ | subroutine drawsmile(x, | ||
+ | # draw a smile with the center at x,y and with a radius of r | ||
+ | # position and size everything based on fractional multiples of the radius | ||
+ | color black, yellow | ||
+ | | ||
+ | | ||
+ | color black | ||
+ | | ||
+ | color yellow | ||
+ | | ||
+ | color black | ||
+ | eye = int(.1*r) | ||
+ | if eye=0 then eye = 1 | ||
+ | | ||
+ | | ||
+ | end subroutine | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== See Also ==== | ||
+ | {{page> |