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:

    Many people will say to working mothers, in effect, “I don’t think you can have it all.” The phrase for “have it all” is code for “have your cake and eat it too.” What these people really mean is that achievement in the workplace has always come at a price—usually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.
    Anne C. Weisberg (20th century)

    Faultless honesty is a sine qua non of business life. Not alone the honesty according to the moral code and the Bible. When I speak of honesty I refer to the small, hidden, evasive meannesses of our natures. I speak of the honesty of ourselves to ourselves.
    Alice Foote MacDougall (1867–1945)