** END HEADER -- do not remove this line // // Generated on 2023-07-26 // parameter bModal local f f = new square2Form() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class square2Form of FORM with (this) onOpen = class::FORM_ONOPEN height = 16.0 left = 7.4286 top = 1.6818 width = 67.5714 text = "" endwith this.PUSHBUTTON1 = new PUSHBUTTON(this) with (this.PUSHBUTTON1) onClick = class::PUSHBUTTON1_ONCLICK height = 2.0909 left = 13.0 top = 7.4091 width = 15.2857 text = "Calculate squares" endwith this.EDITOR1 = new EDITOR(this) with (this.EDITOR1) height = 8.1818 left = 37.2857 top = 3.5909 width = 20.0 value = "" endwith function ENTRYFIELD1_onGotFocus() this.value = '' form.entryfield2.value = '' return function PUSHBUTTON1_onClick() crlf = chr(13)+chr(10) nStart = 3 for n = nStart to 4+nStart form.editor1.value += str(n,2)+' * '+str(n,2)+' = '+ square(n)+CRLF next return function form_onOpen() set procedure to square.prg return endclass