Please enable JavaScript to view this site.

A-Shell Reference

The Version Copy (VC) switch causes the compiler to make a backup copy of every source module encountered (the main program and any ++INCLUDE files) according to the pattern. The idea is to provide a simple way to archive source code, which is sensitive to program versions.

The pattern is made up of literal characters, plus any of the following:

Symbol

Meaning

%d

directory of the original file (e.g. c:\vm\miame\dsk0\150100\)

%f

filename of the original file, minus extension (e.g. myprog)

%e

extension of the original file (e.g. bas)

%v

vedit value of the file. For the main file, this comes from the program statement, e.g. "PROGRAM name,M.ms(eee)" where M=VMAJOR, m=VMINOR, s=VSUB and ###=VEDIT. For included files, it comes from a comment found anywhere in the file, having the following form:

!VEDIT = ###

Spaces around the "=" are optional, and the ### may be one to five digits long. Following the last digit, to the remainder of the line, no characters are allowed except spaces and "!". These restrictions are to avoid confusing an occurrence of "VEDIT" in, say, an assignment statement, with a declaration of the version number of the source file.

 

Note that VUE uses the same rules to identify the VEDIT statement, used in two special commands related to using the VEDIT value:

Command

Result

^_E

increments the VEDIT value and inserts a partially filled in dated edit history line at the cursor location

^SE

inserts a "[###]" at the cursor location (### = the current VEDIT value)

 

If no VEDIT value is defined for the current file, it is treated as 0.

For example, consider an original program file (after conversion to local syntax) of c:\vm\miame\dsk0\909060\sqltest4.bp :

/vc:%d%f-%v.%e        ==> c:\vm\miame\dsk0\909060\sqltest4-104.bp

/vc:c:\backup\%f.%e   ==> c:\backup\sqltest4.bp

/vc:%dalpha-%v-%f.bak ==> c:\vm\miame\dsk0\909060\alpha-104-sqltlest4.bak

The pattern may also be quoted, which is necessary in order for it to contain spaces or slashes, i.e., under Unix we might have:

/vc:"%dback up/%f.%e"  ==> /vm/miame/dsk0/909060/back up/sqltest4.bp

Without the quotes, the pattern will be terminated at the first space or forward slash.

Note that if the %d (directory) directive is omitted from the pattern, the copied file will be placed in the current directory. This would be one easy way to get all of the ++INCLUDEd modules used by a program into one directory. See the following topic on the /LI switch for a related feature.