
-----------------------------------
cam
Wed Jan 24, 2007 5:29 pm

Help for getting a limited amount of letters Urgent
-----------------------------------
Right now I have this

var word : string (12)
get word


I've tried 

get word (12)

So what command can I give to check to get only at most 12 letters?

-----------------------------------
ericfourfour
Wed Jan 24, 2007 5:32 pm

RE:Help for getting a limited amount of letters Urgent
-----------------------------------
I believe get word : 12 will work.

var word :string
get word : 12
put word

-----------------------------------
cam
Wed Jan 24, 2007 6:09 pm

Re: Help for getting a limited amount of letters Urgent
-----------------------------------
thx but it doesn't work... but if I were to do a if statement to bullet proof it? What would I use to see if the word has less then 12 letters?

-----------------------------------
ericfourfour
Wed Jan 24, 2007 6:39 pm

RE:Help for getting a limited amount of letters Urgent
-----------------------------------
The one I showed only takes 12 characters from the keyboard buffer. The rest are left alone. If you want the user not to be able to type more than 12 characters, I suggest looking into: Input.getchar ().

-----------------------------------
cam
Wed Jan 24, 2007 7:24 pm

Re: Help for getting a limited amount of letters Urgent
-----------------------------------
I think I'll just use :( ) because I don't want to get even more complicated thank you
