How can I explain?
Let’s start at the beginning.
This is from TDK_Man's tutorials on how to get a sub-string from a string
A$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Sub$=""
For N=7 To 11
Sub$=Sub$+Mid$(A$,N)
Next N
and I said
Quote: "I currently use this in a subroutine."
Here’s how I used it in a subroutine
hide mouse
dim tw(20)
wait 500
set text font "arial"
set text size 21
set text to bold
th=text height("arial")
ink rgb(255,217,128),1
rem ====================== Message =====================
a$="The Game Creators"
tw=text width(a$)
across=320-tw/2:down=190
rem ------------------ Go to subroutine ----------------
pos=1:length=4
gosub getsubstring
text across,down,sub$
wait 500
pos=5:length=9
across=across+text width(sub$)
gosub getsubstring
text across,down,sub$
wait 500
pos=10:length=17
across=across+text width(sub$)
gosub getsubstring
text across,down,sub$
wait 500
inc down,(th*1)
rem ==================== New message ===================
a$="The Home of Dark Basic"
tw=text width(a$)
across=320-tw/2
rem ------------------ Go to subroutine ----------------
pos=1:length=4
gosub getsubstring
text across,down,sub$
wait 500
pos=5:length=9
across=across+text width(sub$)
gosub getsubstring
text across,down,sub$
wait 500
pos=10:length=12
across=across+text width(sub$)
gosub getsubstring
text across,down,sub$
wait 500
pos=13:length=17
across=across+text width(sub$)
gosub getsubstring
text across,down,sub$
wait 500
pos=18:length=22
across=across+text width(sub$)
gosub getsubstring
text across,down,sub$
wait key
end
` ---------------------------------------------------
` Subroutine to get part message to write to screen
` ---------------------------------------------------
getsubstring:
sub$=""
for n=pos to length
sub$=sub$+mid$(a$,n)
next n
return
Then I said
Quote: "How can I change to use in a function and how would I call it?"
Again, if you check
http://forum.thegamecreators.com/?m=forum_view&t=114865&b=10
you’ll see how I changed to use in a function.
The Wizard
The simplest way to learn speed reading is to get an unexpected letter from the taxation office