This shows you the differences between two versions of the page.
en:include [2016/08/13 12:45] admin |
en:include [2020/02/28 10:46] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Include (Statement) ===== | ||
- | ==== Format ==== | ||
- | |||
- | **include** [[stringconstants|" | ||
- | |||
- | ==== 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> | ||
- | |||
- | ==== History ==== | ||
- | |0.9.9.69|New to Version| |