Low-level programming languages are languages designed for specific, advanced tasks, and are generally do not resemble spoken language at all. High-level programming languages aim to provide programming languages that are similar to the spoken language.
The following code shows an example application that shows the output "Hello, whats up world?" in a console window, and then waits for the user to press a key before exiting.
Looking at the code, you could probably guess what each line is, aside from maybe lines 1, 3, 11 and 13 (which will be described in a later posting). If you look at lines 6 and 9, it easy to understand what is going on.
- Module ExampleApplication
- Sub Main()
- ' This will write a line to the console.
- Console.WriteLine("Hello, what's up world?")
- ' This will cause the console application to pause so we can see it't output. Not the best method, but works for this example.
- Console.ReadLine()
- End Sub
- End Module
* This source code was highlighted with Source Code Highlighter.
On line 6 you could probably guess that were are going to 'write' "Hello, what's up world?" to the console. And that line 9 is going to read the next line inputed to the console. Since the program isn't using the new line for anything, it continues on to line 11 which ends that section of code, and then the program.
When the application is ran, you will see this on the screen:
The example application running. |
No comments:
Post a Comment