The Database Managers, Inc.

Contact The Database Managers, Inc.

Use an RSS enabled news reader to read these articles.Use an RSS enabled news reader to read these articles.

Page 4

Compiling DataFlex Programs

by Curtis Krauskopf


It's convenient being able to compile groups of files like this:

dfc ap*.src

and then look for .ERR files to tell you which source files compiled with errors. How about being able to specify multiple groups of files on the dfc command line? Such a command would look like this

dfc ap*.src ar*.src gl*.src


The shift command changes the positions of the parameters of a batch file. Each parameter is shifted one position to the left. So:

%2 become %1
%3 becomes %2

and so on.

The following batch file allows multiple groups of files that use wildcards, or the compilation of individual files through the dfc batch file.


@echo off

REM dfc.bat:
REM   Created by Curtis Krauskopf
REM   October 9, 2003
REM   The Database Managers, Inc.
REM   Permission to use this batch file is granted
REM   provided this banner stays in the file.

if x%1==x goto instructions

REM   Eliminate all .ERR files.  Create one .ERR file
REM   so that the del command doesn't complain that
REM   no files were deleted.
echo x > 1.err
del /q *.err

REM   Compile the %1 parameter
for %%s in (%1) do dfcomp %%s -v1fskw
if x%1 NEQ x goto compileAgain
Echo Compilation Finished 
echo File Not Found means there were no compile-time errors:
dir /-b *.Err
goto done :instructions echo   You need to provide a filename (with optional echo   wildcards) that is used to compile the programs. Echo     Example: %0 AP*.src menu.src GL*.src :done

An example command line is:

dfc AP*.src menu.src AR*.src

Go Back to Page: 1   2   3
Copyright 2003-2010 The Database Managers, Inc.


DataFlex Decompiler
DataFlex: Tips | Freeware | WebApp Server | Books | Links
Services | Programming | Contact Us | Recent Updates

Send feedback to: