This is part of the HicEst documentation
Join: Space Controlled Catenate of 2 Strings
The ampersand operator serves to join 2 strings with a controllable number of spaces in between. The // operator simply concatenates 2 strings.
⇾Home
⇾Contents
⇾more Strings
⇾ Examples
Bookmarks:
⇾concatenation
⇾join
⇾mixed_type
The Join operator "&" serves to
join
trimmed strings with a controllable number of spaces in between
character strings
CHARACTER
A*10/"abc"/, B*20/"xyz"/, C*40
! define sample strings
C = A & B
! = "abcxyz"
C = A && B
! = "abc xyz"
C = A &&&& B
! = "abc xyz" etc.
character string and number
C = A & 1.23
! = "abc1.23"
C = A && 1.23
! = "abc 1.23"
C = A &&&& 1.23
! = "abc 1.23"
C = 1.23 && "PQ"
! = "1.23 PQ" etc.
file elements, see also
MatrixExplorer
CHARACTER
TestFile="myfile.txt"
OPEN
(FIle=TestFile, Format="=,A,")
! column 1 from line start to "=", column 2 from "=" to line end
C = A && TestFile(141,2)
! "abc RightHandSideOfRow141"
C = TestFile(142,1) & Testfile(141,2)
! "Left142Right141"
C = & ( Testfile(
$1
,2) & $CRLF)
! joins column 2 of all rows, separated by line breaks (
InlineLoop
)
The Concatenation operator "//" joins strings untrimmmed:
NewString = string1 // string2 // string3
!
concatenation
of strings
OtherString = "x = 123.456" //
TRIM
(string2) // n^2
!
mixed_type
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.