Re: inputing from keyboard

new topic     » goto parent     » topic index » view thread      » older message » newer message
fred said...

if you input or get key can you put a full sentence in a data base and check against known words

It sounds like you are fairly new to computer programming. Welcome. There are many people here who can help you learn to program well and also learn the Euphoria programming language.

Maybe we can begin with a bit more detail about what you are trying to achieve with your program. Your initial question is pretty open to lots of interpretation, so how about you narrow it down a bit more. For example, is this a text game you are writing? Or maybe something else? How do you see users of the program operating it?

But as your question stands, the simple answer is 'yes'.

The get_key routine collects whatever keyboard button is pressed, one at a time. To get a whole sentence (line?) you have to use the get_key() routine repeatedly until your program decides that the whole sentence (line?) has been entered by the user. If you want to, you can add that line to a database before or after you check it for known words (spell checking?).

Your program would need to break up the sentence into a set of words and compare them to a 'dictionary'. What you do with incorrect words will also be under your control, so you need to decide what to do in those circumstances.

Let us know a bit more about your aims and we can provide a lot more detailed advice etc ...

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu