Mat2Str: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 3: | Line 3: | ||
Mat2Str(Mat Source$, Destination$, [, Delimiter$]) | Mat2Str(Mat Source$, Destination$, [, Delimiter$]) | ||
By default a [[CR]] | By default a [[CR]] on Linux or [[CRLF]] on Windows will be inserted as a delimiter. | ||
The delimiter will be put after every entry from the array including the last entry. The delimiter can be "" which would simply concatenate the array. | The delimiter will be put after every entry from the array including the last entry. The delimiter can be "" which would simply concatenate the array. | ||
Mat2Str performs the opposite action of [[Str2Mat]] | Mat2Str performs the opposite action of [[Str2Mat]] | ||
Example: | |||
00010 dim resulting_String$*100, array$(3) | |||
00020 let array$(1)="first" | |||
00030 let array$(2)="second" | |||
00040 let array$(3)="third" | |||
00050 mat2str(mat array$,resulting_String$,"//") | |||
00060 print resulting_String$ | |||
Output: | |||
first//second//third | |||
<noinclude> | <noinclude> | ||
[[Category:Internal Functions]] | [[Category:Internal Functions]] | ||
</noinclude> | </noinclude> |
Revision as of 20:42, 26 January 2012
Business Rules! 4.20 introduces the Mat2Str internal function which converts an array to a string
Mat2Str(Mat Source$, Destination$, [, Delimiter$])
By default a CR on Linux or CRLF on Windows will be inserted as a delimiter.
The delimiter will be put after every entry from the array including the last entry. The delimiter can be "" which would simply concatenate the array.
Mat2Str performs the opposite action of Str2Mat
Example:
00010 dim resulting_String$*100, array$(3) 00020 let array$(1)="first" 00030 let array$(2)="second" 00040 let array$(3)="third" 00050 mat2str(mat array$,resulting_String$,"//") 00060 print resulting_String$
Output:
first//second//third