Example Programs
"Hello" program:
print "hello"Program to open a Console window and print 10 random numbers:
openconsole for i = 1 to 10 x = Rnd(100) print x next i do:until inkey$<>"" closeconsole endProgram to create a GUI window with an Exit button and event handling routine:
def w:WINDOW def wstyle:INT wstyle = @SIZE|@MINBOX|@MAXBOX WINDOW w,50,50,800,600,wstyle,0,"Window Title",main SETWINDOWCOLOR w,RGB(0,0,90) CONTROL w,"B,Exit,(800-80)/2, 500, 80, 40, 0, 1" WAITUNTIL w = 0 END SUB main SELECT @CLASS case @IDCLOSEWINDOW closewindow w ' clicking the Exit button ... case @IDCONTROL select @CONTROLID case 1 closewindow w endselect endselect RETURNRead more about this topic: Creative Basic
Famous quotes containing the word programs:
“Will TV kill the theater? If the programs I have seen, save for Kukla, Fran and Ollie, the ball games and the fights, are any criterion, the theater need not wake up in a cold sweat.”
—Tallulah Bankhead (19031968)
“[The Republicans] offer ... a detailed agenda for national renewal.... [On] reducing illegitimacy ... the state will use ... funds for programs to reduce out-of-wedlock pregnancies, to promote adoption, to establish and operate childrens group homes, to establish and operate residential group homes for unwed mothers, or for any purpose the state deems appropriate. None of the taxpayer funds may be used for abortion services or abortion counseling.”
—Newt Gingrich (b. 1943)