Skip to main content

Include

Include (Instrucción)​

Formato​

include "nombre_de_archivo"

Descripción​

Incorpora al programa un archivo de código externo en el momento de la compilación (cuando se pulsa el botón Ejecutar). El argumento de la instrucción Include debe ser una constante de cadena.

Ejemplo​

guardado como smilerandom.kbs​
include "smilesubroutine.kbs"
clg
while true
call drawsmile(300*rand, 300*rand, 50*rand+5)
end while
end
guardado como smilesubroutine.kbs​
subroutine drawsmile(x,y,r)
# dibujar una cara sonriente con centro en x,y y radio r
# todo se sitúa y se dimensiona con fracciones del radio
color black, yellow
penwidth 1
circle x, y, r
color black
circle x, y+.2*r, .5*r
color yellow
circle x, y, .5*r
color black
eye = int(.1*r)
if eye=0 then eye = 1
circle x-.35*r, y-.3*r, eye
circle x+.35*r, y-.3*r, eye
end subroutine

Véase también​

EditVisible, GraphToolBarVisible, GraphVisible, Include,MainToolbarVisible, Maximize, OutputToolBarVisible, OutputVisible, RegexMinimal, Ostype, System, Version

Historial​

0.9.9.69Nuevo en esta versión