I have a question regarding declaration of variables with different definitions on different subranges.
Assuming we have a subscript family COUNTRY containing the following subscript elements: FRA, ITA, USA, CAN, with FRA and ITA contained in the subrange EU, whereas USA and CAN contained in the subrange NAM.
We want to define a variable VAR depending on COUNTRY.
Among the following suggestions, which one would work (or not), and which one would be the best way to go?
- VAR[EU] = x
VAR[NAM] = y - VAR[COUNTRY]:EXCEPT:[NAM] = x
VAR[NAM] = y - VAR[COUNTRY]= IF THEN ELSE(COUNTRY = EU, x, y)
- VAR[COUNTRY]= IF THEN ELSE(COUNTRY = FRA :OR: COUNTRY = ITA, x, y)