4 ms·
You mean this: do while .t. @ 22, 1 clear to 22, 78 @ 22, 26 say 'Ready to Print ? <Y/N> ' get cPType pict '!' ;
by jasim 9y ago
You mean this:
do while .t.
@ 22, 1 clear to 22, 78
@ 22, 26 say 'Ready to Print ? <Y/N> ' get cPType pict '!' ;
valid ( cPType = 'Y' .or. cPType = 'N' .or. cPType= 'H')
read
if cPType = 'N'
exit
elseif cPType = 'H'
jAlert( ';Help on Print Formats - Press : ;;' + ;
' Y for normal bill without leaving no blank lines;' + ;
' N for aborting bill print ;' + ;
';' + ;
' L for Large bill covering an A4 size paper'
)
loop
endif
invoice_print( cPType )
exit
enddo
This piece of code executes linearly, there are no events to listen for and so no callbacks. There are only keyboard events that occur at specific times in the program's execution. No mouse events that'd have generated events that you'll need an asynchronous model of the program to deal with. And this screen is fixed size - 24 lines and 80 columns; it has 16 colors: red, green, blue, yellow, and the rest. The window doesn't resize nor the screen size ever change.
Modern GUI however has events and has to work on devices with all sorts of resolutions, and they support mouse and asynchronous execution. The program model is vastly more complex, and although the good old days were really really nice, they would probably never be back.