:Revision=1
:html
<<
128.121
IPAlias-Object|IPAlias
$NoSort
--
The IP-Object IPAlias enables the modification of the interpreter Library-Alias.

However the modification takes effect only with the next integration of a library.

A Libray-Alias makes the interpreter not to load the library specified in the USES-clauses, but the one specified as its "substitute".

Example:
'Lib_DMM' Library is specified in the uses clause for the activation of a DigitalMultiMeter:
<!CODE>
Uses
  'Lib_DMM';
<!TXT>

The same interpreter steps should be used now in different positions, where the positions are equipped partly with IEC-Multimeters, partly with RS232-Multimeters. Still other positions should use only the integrated AD-converter.

For each application case a Library will be written:
<!STBL>
<!>Lib_DMM<!>for the internal AD-converter<!>
<!>Lib_IEC_DMM<!>for the IEC-devices<!>
<!>Lib_RS232_DMM<!>for the RS232-devices<!>
<!ETBL>

All the libraries must be in accordance regarding the procedures and functions which are used from the outside (same procedure/function-names and same type and number of parameters and / or return values). The procedures / functiones themselves, as well as the methods used internally can be naturally matched to individual cases.

Normally, when the above mentioned USES-clause occurs, it is always the Lib_DMM that is loaded, as specified.

If an Alias of the
<!SYN>
Lib_DMM = Lib_IEC_DMM 
<!TXT>
form is entered in the basic setup, then - in case of unmodified USES-clause - the Lib_IEC_DMM Library is loaded instead of the specified Lib_DMM.

The interpreter checks up each library to see if there is a substitute defined for the specified name.

The above mentioned Alias can be generated with the following command over an interpreter step:
<!CODE>
IPAlias.Set ('Lib_DMM', 'Lib_IEC_DMM');
<!TXT>
>>

<<
128.121.1
Functions of the IPAlias-Object|Function
--
>>

<<
128.121.1.1
IPAlias.Get|Get
!128.121.2.1
---
<!DEF>
function <!TW>IPAlias.Get (sGiven : string) : string;
<!TXT>
Returns the library alias of the library <!PW>sGiven.
>>

<<
128.121.2
Procedures of the IPAlias-Object|Procedures
--
>>

<<
128.121.2.1
IPAlias.Set|Set
!128.121.1.1
!128.121.2.2 - MeasData.Store
---
<!DEF>
procedure <!TW>IPAlias.Set (sGiven, sUsed : string);
<!TXT>

Defines a Library-Alias for the library <!PW>sGiven .

If the library referred to as <!PW>sGiven is used in a subsequent IP-Step, then instead of this library the one referred to in <!PW>sUsed will be used. An already existing Alias for <!PW>sGiven will be modified.

If <!PW>sUsed is empty, then an already existing Alias for <!PW>sGiven is deleted.

If <!PW>sGiven is empty, the command has no effect.

The modification is implemented just internally; after the next reset the aliases from the basic setup are reactived.
>>

<<
128.121.2.2
IPAlias.Store|Store
!128.121.1.1
--
<!DEF>
procedure <!TW>IPAlias.Store;
<!TXT>
Writes the list of the Library-Aliases to the System.Ini, so that they are automatically loaded with the next reset or system start.
>>
<<
128.121.2.3
IPAlias.Clear|Clear
!128.121.2.2 - MeasData.Store
--
<!DEF>
procedure <!TW>IPAlias.Clear;
<!TXT>
Deletes all the Library-Aliases.

The modification is implemented just internally; after the next reset the aliases from the basic setup are reactived.
>>
