O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Keyboard Commands

The keyboard commands in DB are pretty easy to use. There are commands for reading entire strings as well as for reading one character. You have used many of the commands in previous chapters without knowing exactly what they are or what they do.

Reading Text Input

The most fundamental requirement of basic input commands is reading a string or number input. You need to read a string to gather information such as the player’s name or his favorite color. Although you can create your own string input routine with the key press commands, DB provides a command to read strings for you.

The INPUT command is one of the oldest commands in any BASIC language. In fact, it is as old and widely used as the PRINT command. The INPUT command ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required