Here is Run BASIC source code for a simple web application that computes the length of a hypotenuse for a right triangle if the length of the other two sides are known.
[startHere]
print "Hypotenuse Calculator"
input "Length of side A"; a
input "Length of side B"; b
c = sqr(a^2+b^2)
print "Length of hypotenuse (side C) = "; c
input "Compute another (Y/N)"; yn$
if yn$ = "Y" or yn$ = "y" then
cls
goto [startHere]
end if
print "Goodbye."
end
If you're completely new to web programming you may not realize that the above code doesn't look like code for a web app. In fact it looks very much like code for a QBasic program. If you're an experienced web programmer you may be scratching your head because it looks too simplistic to be a web program, but it is a web program.
Run BASIC does its best to hide the hard stuff that most web programming systems force the programmer to deal with. If you really must use some special web development technique Run BASIC provides ways to do that too and we'll cover some of these in later posts. Most of the time it isn't necessary because Run BASIC does the heavy lifting for you.
No comments:
Post a Comment