Posts: 46
Threads: 18
Joined: Jan 2005
Code:
CLS
SCREEN 12
LOCATE 1,1:INPUT "?";USER$
LENGTH=LEN(USER$)
D$=""
DO UNTIL T=LENGTH
C$=LEFT$(USER$,T)
IF C$="A" THEN D$=D$+"A"
IF C$="B" THEN D$=D$+"B"
IF C$="C" THEN D$=D$+"C"
IF C$="D" THEN D$=D$+"D"
IF C$="E" THEN D$=D$+"E"
IF C$="F" THEN D$=D$+"F"
IF C$="G" THEN D$=D$+"G"
IF C$="H" THEN D$=D$+"H"
IF C$="I" THEN D$=D$+"I"
IF C$="J" THEN D$=D$+"J"
IF C$="K" THEN D$=D$+"K"
IF C$="L" THEN D$=D$+"L"
IF C$="M" THEN D$=D$+"M"
IF C$="N" THEN D$=D$+"N"
IF C$="O" THEN D$=D$+"O"
IF C$="P" THEN D$=D$+"P"
IF C$="Q" THEN D$=D$+"Q"
IF C$="R" THEN D$=D$+"R"
IF C$="S" THEN D$=D$+"S"
IF C$="T" THEN D$=D$+"T"
IF C$="U" THEN D$=D$+"U"
IF C$="V" THEN D$=D$+"V"
IF C$="W" THEN D$=D$+"W"
IF C$="X" THEN D$=D$+"X"
IF C$="Y" THEN D$=D$+"Y"
IF C$="Z" THEN D$=D$+"Z"
WORD$=D$
LOOP
LOCATE 20,1:PRINT WORD$
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be
Posts: 30
Threads: 12
Joined: Dec 2004
Where do you initialize and update the "T" variable?
T = 0
T = T + 1
Posts: 2,765
Threads: 138
Joined: Nov 2002
at first look (and the knowledge of knowing that I have NO CLUE what it's supposed to do)
First! J00 never increment T.... ever... it stays at 0 indefinatly
I also think you mean
Code:
T = T + 1
C$=MID$(USER$,T,1)
LEFT$ get T characters starting from the leftmost
ALSO! Unless that program isn't done you can make that very shorter.
Code:
CLS
SCREEN 12
LOCATE 1,1:INPUT "?";USER$
LOCATE 20,1:PRINT USER$ [/code]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Posts: 46
Threads: 18
Joined: Jan 2005
well for 1 im not in school so im not going to show anything to a teacher i posted this for my own personal program and i realize that i had left a couple things out on my post but i still cant get the desired results what i am trying to do is be able to list every word separatly within an input for example the sentence hello my name is should return word$(1)="hello" word$(2)="my" word$(3)="name" word$(4)="is" but i cant figure out how to break down the input and put the words into separate blocks i know that when a space " " is encountered this would tell it to add another word exmp word$(6)(7)(8) and so forth i just cant figure out the comand line i need but if somebody understands what i am trying to do would you please help?
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be
Posts: 46
Threads: 18
Joined: Jan 2005
for 1 thank you ChaOs, i really dont understand using mid left right strings so i just decided to use inkey to separate the words heres how i did it
Code:
cls
screen 12
dim word$(100)
w=1
t=1
do
w$=inkey$
word$(w)=word$(w)+w$
if w$=" " then
w=w+1
t=t+l+1
end if
l=len(word$(w))
locate 10,1:print word$(w)
locate 22,1:print t
locate 20,t:print word$(w)
if w$=chr$(13) then exit do
loop
but thanks anyway for the help i will save it and may use it for later (learning) which we all have room to do
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be