home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / fcopy.zip / COPYTEST.PRG < prev    next >
Text File  |  1993-08-04  |  819b  |  29 lines

  1. /*
  2.    Tested under clipper 5.2 only
  3.    Compile with /n
  4.    
  5.    Demo to show how code blocks can be evaluated from a C function.
  6.    This demo just copies a source file to a destination file and 
  7.    Displays the bytes copied.
  8.    
  9.    Test With Clipper 5.2 only
  10.    Copyright (c) Peter Kulek Aug 1993
  11.   
  12.    Compuserve ID  : 100140,1220
  13.    
  14.    Specialising in Data Driven Object Oriented Applications for EIS & MIS
  15.    
  16.    
  17.    use from command line
  18.    C:\>COPYTEST  Source_File_With_Path_&_Ext   Dest_File_With_Path_&_Ext
  19. */
  20.  
  21. function main(cSource,cDest)
  22.     local block := {|x|devpos(24,00),devout('Bytes Copied '+str(x))}
  23.     cSource := if(valtype(cSource)='C',cSource,'copytest.exe')
  24.     cDest   := if(valtype(cDest)  ='C',cDest  ,'test.exe')
  25.     cls
  26.     f_copy(cSource,cDest,block)
  27. return(NIL)
  28.  
  29.