4 ms·
Rexx is such a useful language. I used to use a lot of Kexx macros for the KEDIT editor. The other thing I remember as being novel is the 'whitespace operator'
by karmakaze 5y ago
Rexx is such a useful language. I used to use a lot of Kexx macros for the KEDIT editor. The other thing I remember as being novel is the 'whitespace operator' ( ) for concatenating two strings with a space vs the dot (.) operator which does so with no space.
- arexxbifs 5y agoI think you may be mixing things up a bit. Strings can be concatenated using either double pipes || or just no operator at all, E.G. 'String'FOO will concatenate the 'String' literal and the FOO variable. Writing 'String' FOO instead will put a literal space between the concatenated values. Hence, the || is useful for concatenating two variables: FOO = BAR||BAZ The dot is used for denoting compound variables which, together with the INTERPRET statement, is what was really novel about Rexx IMHO: https://datagubbe.se/rexxtut/ https://datagubbe.se/rexxtut/
- karmakaze 5y agoOh that's right. [I think the dot is from the bit of PHP that I did, doh!]
- flaviobsb 5y agoCaveat, the 'no operator' concatenation strips extra spaces, E.G. 'FOO' 'FOO' Results in 'FOO FOO' The compound variables are really useful, they allow me to create hash like structures in the Mainframe.
- arexxbifs 5y ago> Caveat, the 'no operator' concatenation strips extra spaces I assume you mean Rexx adds an extra space if whitespace is added between the values when concatenating them. I addressed this behavior (though perhaps a bit unclearly) in my original comment.
- kiwidrew 5y ago> the 'whitespace operator' for concatenating two strings with a space Very interesting, awk(1) also does this style of string concatenation; does anyone know of other languages with a similar design? (I'm aware that many functional languages treat whitespace as function application.)
- 1vuio0pswjnm7 5y agoSNOBOL uses the space operator for concatenation. That is probably where AWK copied the design from. (Not to mention associative arrays. SNOBOL was the first language to have them.)
- kiwidrew 5y agoAh, that makes sense!