string_array_subset
Synopsis
Provides prim[start:end] functionality for string arrays.
Inputs
| Name |
Type |
Description |
|
| in |
string [] |
array of strings |
| start |
int |
start of string range |
| end |
int |
end of string range |
|
Output Ports
| Name |
Type |
Description |
|
| out |
string [] |
subset of array in |
|
Description
The useful subset syntax [start:end] is only implimented for prims, in fact Express tells you that it's "not currently" implimented for strings. This module does exactly that.
Parameters
Inputs
in
An array of strings.
start
Using 0 indexing the start of the subset you want to extract.
end
Using 0 indexing the end of the subset you want to extract.
Outputs
out
The string array equivalent to in[start:end].
Example
The Macro returns a subset of the input array of strings:
Input:
in[6] = {"text0","text1","text2","text3","text4","text5"}
start = 2
end = 4
Output:
out[3] = {"text2","text3","text4"}
Files
iac_proj/strarsub/strarsub.v defines the library
iac_proj/strarsub/sas_mods.v module definition
Author
James S. Perrin,
Manchester Visualization Centre
Contact
International AVS Centre
Manchester Visualization Centre
Kilburn Building
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL
See Also
AVS/Express documentation for prim arrays.
|