/* Small REXX using the REXX functions defined in the VP/2 REXXEXT DLL */

Say
Say "REXXEXT - Virtual Pascal for OS/2 REXX extensions"
Say "                           (C) 1996 fPrint UK Ltd"
Say

/* Register the REXXEXT functions for use in REXX                       */

call RxFuncAdd 'SysLoadFuncs', 'REXXEXT', 'SysLoadFuncs'
call SysLoadFuncs

/* Call VPTest to see if it works                                       */
Say "VPTest returns '"VPTest()"'"
Say

/* Test the VPTouch function, which sets the file date and time for all */
/* arguments to the current time.                                       */

rc = VPTouch( '*.cmd', '*.pas' )
if rc = 0 then
  say "VPTouch seems to work"
else
  say "VPTouch reports problem #"rc

/* Also test VPTouch with invalid arguments                             */

/* No matching file is not an error                                     */
rc = VPTouch( '*.txt' )
say "VPTouch with argument *.txt returns "rc

/* File locked by other process is an error                             */
rc = VPTouch( '*.dll' )
say "VPTouch with argument *.dll returns "rc


