how to read a line of text from your console

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Paperninja62
Posts: 4
Joined: Mon Dec 22, 2014 12:18 pm

how to read a line of text from your console

Post by Paperninja62 »

Ok, so i've FINALLY been able to make the keyboard work, but now I'm trying to work in commands. I've been looking around but i can ind anything, how do i read a row, and store its text? I knows probably simple, but i just can't figure it out ](*,) Thanks in advance for your help! If you wish to see my code, ill gladly attach it!
User avatar
iansjack
Member
Member
Posts: 4707
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: how to read a line of text from your console

Post by iansjack »

Well, if you've got the keyboard working you just read each keypress and put them in a buffer. Then your program reads from the buffer when it needs input. There are obviously a few more details to account for.
Paperninja62
Posts: 4
Joined: Mon Dec 22, 2014 12:18 pm

Re: how to read a line of text from your console

Post by Paperninja62 »

wow, thank you so much! I was trying to do just that, except i was doing it in a much more complicated way that wasn't nessicary!
Post Reply