FILCOM |
filcom allows you to return the comment defined in the header of an OBJect defined in an Adonix application.
filcom(directory, filnam, extens [, appli [,vol [,mach]]])
|
Element |
Description |
Restrictions |
|
directory |
Expression of the Char type that gives the name of the sub-directory in the application that contains the file. |
None |
|
fil_nam |
Expression of the Char type that gives the filename |
None |
|
extens |
Expression of the Char type that gives the file extension |
maximum of 12 characters. |
|
appli |
- Numeric expression that
describes a reference application or |
-1 <= appli <= 8 |
|
vol |
Alphanumeric expression that gives the name of the volume |
A letter or the zero (0) |
|
mach |
Alphanumeric expression that gives the name of the targeted machine |
None |
# If the CLIENT table exists in the current application or in one of # its reference applications, display the comment of this tableIf filinfo(filpath("FIL", "BPCUSTOMER", "srf", -1)) >= 0
Infbox filcom("FIL", "CLIENT", "srf", -1)
Endif
The filcom function returns the comment defined in the header of the file for which the path is created with the various parameters passed. If no comment were defined, it returns the empty string. The file must exist.
The construction rules for the file path are the same as for the Filpath function. You will determine the following:
· The last three parameters are optional, since the others may be empty strings. The parameters that are too long will be truncated.
· Under Windows 95 and Windows NT, you may use the slash (/) instead of the backslash (\) in the directory and fil_nam.
· If the directory begins with an exclamation point (!), then Adonix ignores the appli parameter
· If the directory is the period (.), then Adonix creates a corresponding path beginning with period slash (./) and ignores the appli and vol parameters.
· If filnam begins with a slash (/), then Adonix creates an absolute path and ignores the appli and vol directory parameters
· If filnam contains a period (.) (i.e., is in the "A.B" format), then Adonix considers that the first part ("A") is the application and the second ("B") is a file of this application. Adonix does not then take the appli parameter into account.
· If appli has a positive value, Adonix considers that the file is in the reference application of 'appli' number.
· If the name of the application (or its number) is not specified, everything takes place as if it were worth -1
· If appli equals -1, the file is first searched for in the current application. If it is not found there, it is searched for in the reference applications, in the order in which they were declared. Finally, if it is still not found, everything takes place as if it existed in the current application.
· If appli equals zero (0), Adonix considers that the file is in the current application.
· If the volume is not specified, Adonix considers that it is the one where the application described by appli is installed.
· If mach is given, then this machine is taken into account.
· If mach equals "", then this is the machine where the application (server) that is taken into account is installed.
· If mach equals the pound sign (#), then this local machine (client) is taken into account.
The result of the filcom function is of the Char type.
Test the existence of this file, e.g., via the filinfo function, before calling filcom, because if it does not exist, Adonix returns an error message.
The following files are comments in Adonix X3:
· Table of the FIL directory with the extensions srf and fde
· Menu of the MFRA directory with the extensions src and adx
· Process of the TRT directory with the extensions src and adx
· Screen of the EFRA directory with the extensions srm and msk
|
Error |
Description |
|
INCFIC (19) |
File type invalid |
|
ERMODE (10) |
One of the parameters does not have the desired type. |
|
PAFIC (20) |
File does not exist |
FILINFO - FILPATH - NOMAP - ADXMOTHER - ADXMAC
|
|