In computer programming:
QBasic is a simple programming language used mainly for teaching beginning programming students. Many of the commands are basic English terms, making the language simple and easy to understand for a beginner. Program Design Language or PDL is similar in that it shares a common language (English). Although the two are alike, they are not the same. You cannot write a program using Program Design Language and enter it into a QBasic compiler and expect your program to work. QBasic understands some English language commands but can’t comprehend full sentences in English. Furthermore, QBasic needs some syntax common to the QuickBasic language in order to understand commands.
In order for a QBasic compiler to understand what you have written in Program Design Language, you must translate the PDL into QBasic by inserting its syntax and removing unnecessary words and phrases. This is fairly easy to do because the languages are very similar. Translating Program Design Language into other programming languages may pose a slightly more difficult task depending on your familiarity with the programming language you are translating it into. With QBasic it is quite simple because of the common English words that QBasic uses as commands. All that you need to translate is a knowledge of the English language, knowledge of QBasic programming language, and a program written in Program Design Language. Much of what is written in Program Design Language will most likely have very similar if not the exact terms as what your result in QBasic will use as commands.
In the real world:
The translation of Program Design Language into QBasic code is similar to translating two different dialects of the same language. Two people from different regions of the same country may speak the same language but their dialect may be different. Although they speak the same language, pronunciation of certain words and the slang terms they use may differ. Usually if you understand the language you can make out what someone with a different dialect is saying although it might take you a little longer to comprehend.
In English there are many different ways of saying the same thing. When speaking to someone that is new to the language they may not understand a phrase you say that to you may be common or easily understood. Translating Program Design Language to QBasic is like when speaking in plain English to another person who speaks English, but they don’t understand what you are saying. You have to rephrase your sentence in order for them to understand you. Usually when one does this they try to rephrase their sentence into the simplest form in order to make it easy for the other person to understand. You omit unnecessary words, or words that are slang, and change words into a simpler form.
This is much like the translation of PLD into QBasic because the commands in QBasic are short and concise. But in the long run you are using commands that are borrowed from the same language that Program Design Language and QBasic both use (English).
No comments:
Post a Comment