david iz cool instead of making it extreamly difficult or complicated like others would. I'll explain it as simplly as possible.
do you know what a variable is
this A$=blah is a variable it stores information
a function works very simular.
it is a large variable that stors multiple commands that can be called at any time during a program. just buy typing then name just like using a variable.
delcare the function
function whatever you want it to be called()
do what ever here
endfunction
you can either store the function in a different source file if it is very large and just use the include command to use it or if it is in your current source you can just call it buy typing
whaterver you want it to be called()
here is an example
you can use a function for nearly anything
do
blah()
loop
function blah()
Print "please enter your name"
input a$
print "your nams is" + a$
endfunction
as you can see the entire program can practically be a function. and there is not limit to the size.
just incase you didnt get it a easier way to look at it is like this.
do
Print "please enter your name"
input a$
print "your nams is" + a$
loop
it is the same exact thing except the function allowed you to easily put it into your loop.
since you can minimise and expand a function in dbp editor it makes it very nice to use them since you can shrink an entir portion of your source.
A child's dream never dies.