"+" Operator

This forum is meant for questions and discussions about the X# language and tools
Post Reply
stecosta66
Posts: 89
Joined: Mon Sep 26, 2016 12:59 pm
Location: Italy

"+" Operator

Post 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
User avatar
robert
Posts: 4558
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: "+" Operator

Post by robert »

Stefano,

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

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
stecosta66
Posts: 89
Joined: Mon Sep 26, 2016 12:59 pm
Location: Italy

Re: "+" Operator

Post by stecosta66 »

Hi Robert,

thanks, got it

Stefano
Post Reply