
-----------------------------------
AiShiDeSu
Thu Jan 14, 2010 9:59 pm

need a way to limit the how many characters a user can type? =)
-----------------------------------
What is it you are trying to achieve?

OKAII well here's the thing
i'm trying to make a program that will record the user's name and the highest score they get on my game

and i used a get command

HOWEVER, since i wanted to dummy proof it, i want it limited to around maybe 10 character
so the users can't type in something like "asofasgfuoasgofgasog" that messes up my program

I asked my teachers and he had NO idea O.o
so uh, please help? :3
any code that can limit inputting characters?



What is the problem you are having?

i don't know any code for it >_<

Describe what you have tried to solve this problem

well my i looked up turing references and tried

var answer : string (10)

but it didn't work D;


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

noo, just a simple get one


Please specify what version of Turing you are using
i am using 4.1.1 i think =D

THANKS IN ADVANCE ;D

-----------------------------------
TerranceN
Thu Jan 14, 2010 10:05 pm

RE:need a way to limit the how many characters a user can type? =)
-----------------------------------
Get input one character at a time using getch. Look it up in the turing documentation if you don't know how to use it. To get to documentation, in Turing hit F10, and use search to find the documentation for getch.

-----------------------------------
Carey
Thu Jan 14, 2010 10:16 pm

RE:need a way to limit the how many characters a user can type? =)
-----------------------------------
You could also do a 

[code]
loop
    get name
    exit when name len 