Liberty BASIC - Example Code

Example Code

Here are some examples of the language:

"Hello world" program:

print "hello world" end

Program to display a pop-up message box with the words "Hello, World!" on it:

nomainwin notice "Hello world!" end nomainwin notice "Example program" + chr$(13) + "Hello world!" end

Program to display an input box:

nomainwin prompt "Enter your name:";response$ notice "Response:"+ chr$(13) +response$ end

Running another application using Liberty BASIC:

nomainwin run "notepad.exe" end

Printing multiplication table of 5 on form:

for i = 1 to 10 res = 5 * i print res next i end

Read more about this topic:  Liberty BASIC

Famous quotes containing the word code:

    ...I had grown up in a world that was dominated by immature age. Not by vigorous immaturity, but by immaturity that was old and tired and prudent, that loved ritual and rubric, and was utterly wanting in curiosity about the new and the strange. Its era has passed away, and the world it made has crumbled around us. Its finest creation, a code of manners, has been ridiculed and discarded.
    Ellen Glasgow (1873–1945)

    Hollywood keeps before its child audiences a string of glorified young heroes, everyone of whom is an unhesitating and violent Anarchist. His one answer to everything that annoys him or disparages his country or his parents or his young lady or his personal code of manly conduct is to give the offender a “sock” in the jaw.... My observation leads me to believe that it is not the virtuous people who are good at socking jaws.
    George Bernard Shaw (1856–1950)