Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to make a ASCII dictionary!
DangHoang2 (30)

Hello everyone!

In sometimes, you may want to know the ASCII code of a word, sometimes you just want to know it, but sometimes you need it to do work in your program.
Today, I'm going to show you how to make a ASCII dictionary make from BASIC!

What is BASIC?

BASIC(or Beginners' All-purpose Symbolic Instruction Code) is a high-level, easy to use, simple programming language. It was designed by John G. Kemeny and Thomas E. Kurtz and released at Dartmouth College in 1964.
Okay, enough for introducing, let's start to coding!

Making the dictionary

First, create a BASIC project in repl.it, just click on "new repl" button and choose BASIC(Beta) as the progrmaming language for the project.
After create the project, you should have entered to the project, in this time, type this command:
10 PRINT "ASCII Dictionary"
The PRINT command prints the string ASCII Dictionary, and if you asked What is the number 10 you type before?, the answer is: The number 10 is like the line number, it's very useful when you want to create a loop without using the FOR command or use the GOTO command.
Then, type the command down below:
20 INPUT "Key:" ; Key
The INPUT command read the value that user entered(kinda like Python) and assigned to the Key value.
Now, type this command, it will print the ASCII value of the key that user has entered:
30 PRINT ASC(Key)
Finally, type this command:
40 GOTO 20
The GOTO command will do the command in the line 20 and it will make a loop(Like I was say before)

And...Done! You have make a ASCII dictionary with only 4 commands. Very simple and easy, right?

Interested on BASIC?

If you are interested on BASIC, you can go to here for the BASIC docs.

Okay, that's the end of this post, upvote this if you like it! :D

Commentshotnewtop
CodeLongAndPros (955)

Can't get triplets for this, is this designed?