Skip to main content

Include

Include (Opdracht)​

Formaat​

include "file_name"

Beschrijving​

Laadt een extern bronbestand in het programma tijdens het compileren (als je op de knop Uitvoeren drukt). Het argument van de opdracht Include moet een stringconstante zijn.

Voorbeeld​

bewaard als smilerandom.kbs​
include "smilesubroutine.kbs"
clg
while true
call drawsmile(300*rand, 300*rand, 50*rand+5)
end while
end
bewaard als smilesubroutine.kbs​
subroutine drawsmile(x,y,r)
# teken een smiley met het middelpunt op x,y en een straal r
# alles wordt geplaatst en geschaald als een deel van de straal
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

Zie ook​

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

Geschiedenis​

0.9.9.69Nieuw in deze versie