xsharp.eu • "+" Operator
Page 1 of 1

"+" Operator

Posted: Thu Dec 05, 2024 4:35 pm
by stecosta66
XS0023: Operator '+' cannot be applied to operand of type 'string'

I have the follwing code generating an error:

Code: Select all

cHeader1 += + '","' + Space( 14 ) + '","' + Space( 14 )
cHeader2 += + '","' + PadL( cMillHeader, 14 ) + '","' + PadL( "Quota", 14 )
note the "+" after the += assignment. In VO this doesn't give any error, I guess that it simply get ignored. In X# it gives the error above.

I know that is a typo in my code but I don't know if this is an intended behaviour or not.

regards
Stefano

Re: "+" Operator

Posted: Thu Dec 05, 2024 4:47 pm
by robert
Stefano,

This is the intended behavior.
VO was very sloppy in these areas.

Robert

Re: "+" Operator

Posted: Thu Dec 05, 2024 8:22 pm
by stecosta66
Hi Robert,

thanks, got it

Stefano