Category : Files from Magazines
Archive   : VOL8N11.ZIP
Filename : FUNCTEST.PRG

 
Output of file : FUNCTEST.PRG contained in archive : VOL8N11.ZIP
* functest.prg RHS 2/20/89
* This program demonstrates the use of a dBASEIV User-Defined Function
* which you can use to create windowed error messages.
*
* The function, wmsg() requires two parameters.
* The first parameter is the message you wish to print.
* The second parameter is used to prompt the user to press any key or a
* particular key. The function will return the keystroke pressed.
*
* For instance,
* choice = wmsg("Ready to re-index database.","Proceed? (Y/N)")
* if upper(choice) = 'Y'
* && reindex database
* endif
*
*
* The only requirement for using the function, is that you must define the
* msg_win window somewhere in your program code.



Define Window msg_win from 12,5 to 15,75 double color gr+/r

retval = wmsg("This error message appears in a window...","...Press any key")
?"Return value was ",retval
return



Function wmsg
Parameters msg,prompt
Activate Window msg_win && activate the window
@ 0,0 Say msg && print main message
Wait prompt To retval && print prompt, wait for key
Deactivate Window msg_win && deactivate window
Return retval && return key



  3 Responses to “Category : Files from Magazines
Archive   : VOL8N11.ZIP
Filename : FUNCTEST.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/