Execute a DOS command or program

     RUN | !* <xcCommandLine>


     <xcCommandLine> is any executable program including resident DOS
     commands and COMMAND.COM.  It may be specified either as a literal
     string or as a character expression enclosed in parentheses.


     RUN executes a DOS command or program from within a compiled
     application.  When you RUN a DOS program, Clipper executes another
     copy of COMMAND.COM, passing the DOS command line at the same time.
     This has two implications.  First, you must have enough memory for
     COMMAND.COM (5K for DOS 6.2) and the program you wish to execute.
     Second, COMMAND.COM must be available on the path specified by COMSPEC
     (the default is the root directory of the disk where you boot DOS).  If
     COMMAND.COM is not located on this disk or the disk is changed, SET
     COMSPEC to the new location prior to running the Clipper application.
     Note that SET DEFAULT and SET PATH have no effect on RUN.

     The ! form of the RUN command is provided for compatibility purposes
     only and, therefore, is not recommended.

     Warning!  Do not RUN memory-resident programs from within Clipper
     since you may lose memory when the control returns to your application


     .  This example uses RUN with MEMOREAD() and MEMOWRIT() to create
        a user-defined function that calls a text editor with the current
        memo field:

        lSuccess = EditorMemo("Qedit", "Notes")

        FUNCTION EditorMemo( cEditor, cMemofld )
           IF MEMOWRIT("Clipedit.tmp", &cMemofld.)
              RUN (cEditor + " Clipedit.tmp")
              REPLACE &cMemofld. WITH MEMOREAD("Clipedit.tmp")
              ERASE Clipedit.tmp
              RETURN .T.
              RETURN .F.

     .  One of the options you may want to give your users is direct
        access to DOS.  Do this with:


        To make it easier for the user to return to the application program,
        change the DOS prompt in the application batch file like this:

        REM Application Batch File

        ECHO OFF
        PROMPT DOS Access: Type EXIT to return to ;
        <your application program>
        PROMPT $p$g

        Then, instruct the user to execute the application batch file in
        place of the application .EXE file.

 Files   Library is CLIPPER.LIB.


2 responses to “C5_RUN

  1. Pingback: C5 Flow Control | Viva Clipper !

  2. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.