The basic of BASIC

written by Antabax | 3:17:00 PM | | 0 comments »

Not much happened today in the office except that I've learned the basics of basic, lol ? The Visual-Basic uses the Basic language as it's main language. Example to say Hello World! in c++ is something like this:-

cout << ”Hello World”;


But in Visual-Basic it looks like this:-


print “Hello World”


and it doesn't need the ; to end a line and a simple declaration using strings will look like this:-


Dim a As String, b As String, text As String

a = "Hello"
b = "World"
text = a + " " + b + "!
Print text

To compile the coding, I need to find an easy, fast, free and suitable compiler on the net. Its quite hard to find because almost everyone is using Visual Studio (Visual Basic 6 or Visual Studio 2005). I finally found a compiler that is still under development/support. It is called FreeBASIC. It is a typical MS-DOS application. Not that hard to use because the guide on their homepage is quite straight-forward. But for a typical MS-DOS app, u need to type to get things around and the mouse hardly have any function here.


Currently, I am trying to code a simple calculator involving only 2 integers, A and B with 4 operations that is add, subtract, multiply, and divide. It involves loop, declarations and the input and print function. If I managed to do this, then I can say 'takde hal' to the basic of basic, lol.


Translation
takde hal = no problem(s)


Read more about Basic here.
Download FreeBASIC here.

0 comments