%ASSEMBLY


9.2

 

The %ASSEMBLY compiler directive provides an implicit NETOBJECT assembly name when there is no assembly specified on the NETOBJECT declaration and there is no assembly specified on the CREATE instruction. The instruction uses the following formats:

 

 

 

%ASSEMBLY

{assembly}

 

Where:

assembly

Required. The {assembly} is a literal string that contains the default assembly name for NETOBJECTs.

Flags Affected: NONE

Note the following:

  1. The %ASSEMBLY {assembly} string is not used when the assembly has been specified in the CREATE instruction source line or when the assembly keyword has been specified on the NETOBJECT declaration.

  2. If the %ASSEMBLY compiler directive is set in an INCLUDE file, then the {assembly} string is only valid within the scope of the INCLUDE source and any nested include files. When the INCLUDE source level expires, any {assembly} string create in that INCLUDE also expires.

  3. If the %ASSEMBLY compiler directive is set inside the scope of a FUNCTION/FUNCTIONEND, the {assembly} string is only valid within the scope of the FUNCTION/FUNCTIONEND. When the FUNCTIONEND is encountered, the {assembly} for the FUNCTION is terminated.

  4. When the %ASSEMBLY compiler directive is enabled and used for CREATE instruction, the {assembly} string is compiled into the CREATE instruction the same as if the 'ASSEMBLY={assembly}' keyword was specified in the CREATE source line.

Example:

 

A

NETOBJECT

CLASS="System.IO.File;"

B

NETOBJECT

CLASS="FUNCTION.CLASS.STRING"

C

NETOBJECT

CLASS="SUBROUTINE.CLASS.STRING"

.

 

 

 

%ASSEMBLY

"mscorlib" ;Default assembly

.

 

 

 

CREATE

A ;Uses Default assembly string!

.

 

 

  

CALL

FNC

.

 

 

 

CALL

SUBROUTINE

.

 

 

 

STOP

 

.

 

 

FNC

FUNCTION

 

 

ENTRY

 

.

 

 

 

%ASSEMBLY

"FUNC_ASSEMBLY_NAME" ;Only for FUNCTION

.

 

 

 

CREATE

B ;Uses Function assembly string!

.

 

 

 

FUNTIONEND

 

.

 

 

SUBROUTINE

 

 

 

CREATE

D ;Uses Default assembly

 

RETURN

 

 

 

See Also: Compiler Directives

 



PL/B Language Reference Compiler Directives_1 %AUTODIM