Yes I see.
Even this does not works:

IF X=1 then
Y var PORTA.0
else
Y var PORTA.1

So this is just compiler limitation, right?

For the arrays, can be port name in it?