: : Does anyone have a function that can pull a word out of a sentene. For exmaple:
: :
: : a$ = word$("I love you", 2)
: : Print a$
: :
: : This peice of code would return "love".
: :
: : I know I could right it myself but I'm sure there already is one and i'm feeling lazy...
: :
:
: I've written a function for parsing COMMAND$. I'll have to post it later. It'll do exactly what you asked, but it's simple code. You could write one yourself.
:
:
:
Finally! I was having problems with my connection. Here it is:
[\red]
FUNCTION CMDLINE$ (x%)
a$ = COMMAND$
temp$ = ""
count% = 1
alen% = LEN(a$)
FOR i% = 1 TO alen%
m$ = MID$(a$, i%, 1)
IF m$ = " " THEN count% = count% + 1
IF m$ <> " " THEN
IF x% = count% THEN temp$ = temp$ + m$
END IF
NEXT i%
CMDLINE$ = UCASE$(temp$)
END FUNCTION
you'll need to modify it so that it takes a$ as an argument, and comment out the a$=COMMAND$.
I'll leave the rest to you.