0

Hello Everyone I am new to rexx. can you please help me out with this string concatenation.

I have a string My Name is Raiza. and I need to add a single quote before and after Raiza . But I cant get it .

"My Name is " " 'Raiza' " how should I do this using rexx.

Parinita
  • 87
  • 2
  • 13

2 Answers2

3

try

  "My Name is '"NameVar"'"

In Rexx

  String1" "String 2" ==>  "String1 String 2"  == "String1" || " " || "String 2" 

  Var1 = "aaa"
  "String 1"Var1 ==> "String 1aaa"    == "String 1" || Var1

In rexx || is trhe concenation operator but a space between two Strings is eqivalent to || " " ||. If you place a variable next to a String (no white space) it is equivalent to ||

So

   "Hi "user" welcome to rexx"

is the same as

   "Hi " || user || " welcome to rexx"

and

   "Hi" user "welcome to rexx"
Bruce Martin
  • 10,358
  • 1
  • 27
  • 38
0

Adding a say statement like this -

say "My Name is 'Raiza'"

should give the output as below:

My Name is 'Raiza'