Navigation:  Reference > Functions >

General Information:  Functions

Print this Topic Previous pageReturn to chapter overviewNext page

 

The following format is used in documenting the TAS Professional Functions.

 

The functions are listed in alphabetical order.

 

The function NAME and STRUCTURE is the first part of each definition.  For example:

 

ALC_FLD(1,2)

 

ALC_FLD is the name of the function, in this case it stands for AllocateField

 

1 & 2 are the two options and make up the structure of the function.  They will be defined in the PARTS section.

 

NOTE:  If there are no options there will be no numbers between the parentheses.

 

The PURPOSE of each function is a brief definition of what it does.  This provides a quick insight into the function, and why the programmer might use it.

 

The PARTS of each function are listed by number.

 

Each function part is described, along with its purpose, valid values, default value (if applicable), consequences, and whether or not the part is required.

 

NOTE:  If the part is not required and you don't want to include it all you have to do is leave it out.  If you need to save the place for a further option then include the comma.  For example:

 

       FUNC1 has parts 1,2,3 & 4

       parts 1 & 2 are required, 3 & 4 are optional

       

       If you don't need 3 and 4 you may use:

 

               FUNC1(xxx,yyy)

 

       If you need 4 but not 3 you may use:

 

               FUNC1(xxx, yyy, , zzz)

 

       Notice the extra comma to save the

       place of part 3.

       

 

The programmer entry portion can consist of the following:

 

f/c/e

Field/Constant/Expression.  You can use any type of field or constant.  This can consist of alpha or numeric constants as well as any type of field or variable field.  You can also use an expression that results in the proper type of field.

 

fn/v

Field name/Variable field.  In certain functions you must use the actual field name or a variable field.

 

file_num

In commands you are told to put an ampersand (@) before a field name that contains the file number/handle.  In functions this is NOT necessary.  In all functions that require a file number/handle you will see the option referred to as a f/c/e.  You would still use the same field name as in a file_num option, just don't preface the field with the @.

 

key_expr

You may define the key number to be used in a command in several ways:

 

number - The actual number of the key, as defined in the data dictionary, may be used preceded by an ampersand (@).   @3 refers to the third key in the appropriate file (the first key is 1).

 

key name - The name of the key as assigned in the data dictionary may be used. dict_overlay is an example of a key name.

 

no key - If you do not want to use a key but want to access the file through the direct method then use the no key symbol, the number 0 preceded by an ampersand ('@'). @0 tells the program to use the direct access method when searching this file.  This is the default method when you have opened a non-TAS file.

 

lexpr

An expression that will resolve to a logical value of .TRUE. or .FALSE.  For example:

 

fld1 = 100

 

another example:

 

(fld1 = 100 .a. fld2='ABC') .o. fld3=.FALSE.

 

The RETURN TYPE and what is being returned is given.

 

Special COMMENTS or restrictions are given where applicable.

 

EXAMPLES may be included that will show you the function as part of a piece of code.

 

Functions may be nested up to 10 deep:

 

F1(F2(F3(F4(F5(F6(F7(F8(F9(F10())))))))))

 

Fx in this example represents a TAS Professional function name.  A Function may be used in any expression.

 

SEE ALSO will list the commands/functions that are related to the function being explained.

 

NOTE: There are many functions in TAS Professional 5.1 and previous that have no usage in TAS Professional programs.  In those cases we have removed those functions from this manual to eliminate confusion.  Most of those functions are still available in this version to facilitate running 5.1 programs.  The TAS Professional 5.1 manual is available in PDF format if you wish to go back and investigate those options.

 

 


Page url: http://www.cassoftware.com/tas/manual/generalinfofunctions.htm