Give a file name a default extension.
──────────────────────────────────────────────────────────────────────────────

Syntax

GT_DefExt(<cFileName>,[<cDefExt>]) --> cNewFileName

Arguments:

<cFileName> is the file name to be checked.

<cDefExt> is an optional character paramater which is the
extension to add to the file. This can be in the format of
`.xxx' or just `xxx'. If not supplied the default is "".

Returns:

The file name as it was if it had an extension, or the file name
with the default extension if it didn't have one.

Description:

GT_DefExt() can be used to supply a default extension to a file.
This can be of use in file i/o functions or for tidying up user
input.

Examples:

// Get a file name form the user and default the extension.

cFileName := space(12)
@ 10,10 say "File To Open:" get cFileName picture "!!!!!!!!!!!!"
read
cFileName := GT_DefExt(cFileName,"DBF")

Source: DEFEXT.PRG

Author: Dave Pearson