Article ID: 31557 - View products that this article applies to.
This article was previously published under Q31557
This article has been archived. It is offered "as is" and will no longer be updated.
An array of fixed-length strings cannot be passed directly as a parameter to a SUBprogram or FUNCTION procedure (that is, the phrase AS STRING*n cannot be used in DECLARE, SUB, or FUNCTION statements).
The following are three alternatives for passing an array of fixed-length strings to a procedure:
Note that when you pass a simple fixed-length string variable to a procedure, it is always converted to a variable-length string. Thus, the variable-length STRING type is allowed in DECLARE, SUB, and FUNCTION statements, but the fixed-length STRING*n type is not.
The following is an example (Example 1) of how to pass an array of fixed-length strings through COMMON SHARED:
The following is an example (Example 2) of how to pass an array of user-defined type as a parameter to a procedure:
The following is an example of how to pass an array of user-defined type through COMMON SHARED:
Article ID: 31557 - Last Review: August 23, 2013 - Revision: 1.2
Contact us for more help