This shows you the differences between two versions of the page.
es:include [2016/01/01 22:43] |
es:include [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Include (Comando) ===== | ||
+ | ==== Formato ==== | ||
+ | |||
+ | **include** "// | ||
+ | |||
+ | ==== Descripción ==== | ||
+ | |||
+ | Incluye un fichero fuente en tiempo de ejecución en el programa. El argumento al comando (file_name) debe ser una variable alfanumérica o una cadena o un literal. \\ | ||
+ | Loads an external source file at compile (when the run button is pressed) time into the program. | ||
+ | |||
+ | ==== Ejemplo ==== | ||
+ | |||
+ | == 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 | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Ver También ==== | ||
+ | {{page> | ||
+ | |||
+ | ==== Historial ==== | ||
+ | |0.9.9.69|Disponible desde Versión| |