Page 1 of 1

Concatenating the product of a function to a string

Posted: Wed Aug 04, 2004 1:41 am
by fridge
I am wanting to concatenate the product of the function Ebcdic(@) to a string.

I get the error 'No closing quote' which I assume is because I need to protect the value returned from the function with quotes. How would I do this?

Any help appreciated.

Posted: Wed Aug 04, 2004 2:19 am
by fridge
I have resolved it!

Posted: Wed Aug 04, 2004 3:30 am
by ray.wurlod
Yes? How? Please share. We do.

Posted: Wed Aug 04, 2004 5:15 am
by fridge
Apologies Ray - I simply hard coded the value I wanted to convert into a variable and then read the variable value into the function which worked.

Arg1 = "\"
Arg2 = EBCDIC(Arg1)
Ans = Arg2:"Doohhh"

Posted: Wed Aug 04, 2004 6:30 am
by ray.wurlod
I'm assuming you had tried

Code: Select all

Ans = EBCDIC(Arg1) : "Dohhh"
but what about

Code: Select all

Ans = EBCDIC((Arg1)) : " Doohh"
? The inner parenthese convert the reference to Arg1 into an expression containing a reference to Arg1, preventing side-effects.

(The missing/mismatched quote was probably on the "Doohh".)