Invalid arithmetic operator on string concatenation

Hello.

LEAP_VERSION="4.2"
export ARRAY_MAIN_REPO_LEAP=('zypper_local' 'openSUSE-Leap-'"$LEAP_VERSION"'-Non-Oss'  'openSUSE-Leap-'"$LEAP_VERSION"'-Oss'  'openSUSE-Leap-'"$LEAP_VERSION"'-Update'  'openSUSE-Leap-'"$LEAP_VERSION"'-Update-Non-Oss')

Seems that the - is interpreted as a numeric operation when next to $VAR

The error is :

I was expecting this result :

I am using bash : 4.3-79.15
Any help is welcome.

What you have works fine with bash version 3.2.57 and with recent Korn shells.

You might consider trying:

export ARRAY_MAIN_REPO_LEAP=('zypper_local' "openSUSE-Leap-$LEAP_VERSION-Non-Oss"  "openSUSE-Leap-$LEAP_VERSION-Oss" "openSUSE-Leap-$LEAP_VERSION-Update"  "openSUSE-Leap-$LEAP_VERSION-Update-Non-Oss")

or:

export ARRAY_MAIN_REPO_LEAP=('zypper_local' openSUSE-Leap-"$LEAP_VERSION"-Non-Oss  openSUSE-Leap-"$LEAP_VERSION"-Oss  openSUSE-Leap-"$LEAP_VERSION"-Update  openSUSE-Leap-"$LEAP_VERSION"-Update-Non-Oss)

What does the output from:

printf '%s' "$IFS" | od -bc

look like when your array assignment fails?

Yes that work.
Thank you for helping