Before I post it in another section I would like you to check:
Or is there a logic error?

compiler: 3.7.3.6
micro: PIC16F18877

Dim bitflash as Bit
Dim wLED_U4 as Word
Dim aswTEMPS [3] As SWord
Symbol iBATT_TEMP = 2

The code behaves very odd:
1. Any negative value of aswTEMPS [iBATT_TEMP] results in "case > 0". A value of zero results in "case else".
I have also replaced the array with a single sword variable. Same result.

Code:
    select aswTEMPS [iBATT_TEMP]
    case > 2
        if bitflash = 1 then set wLED_U4.8
    case > 1
        set wLED_U4.8
    case > -1
        set wLED_U4.7
    case > -3
        set wLED_U4.6
    case > -5
        set wLED_U4.5
    case > -7
        set wLED_U4.4
    case > -9
        set wLED_U4.3
    case > -11
        set wLED_U4.2
    Case > -13
        set wLED_U4.1
    case > -28
        if bitflash = 1 then
            set wLED_U4.1
            set wLED_U4.0
        endif
    Case else
        set wLED_U4.0
    end select
2.
I have re-written it into if..elseif.. endif.
This code corrupts the code and the array. My code has 4000+ lines and when I just add this code in a subroutine, the sword array will be accessed wrong in other parts of the code.
Code:
    If aswTEMPS [iBATT_TEMP] > 2 Then
        If bitFLASH = 1 Then Set wLED_U4.8
    ElseIf aswTEMPS [iBATT_TEMP] > 1 Then
        Set wLED_U4.8
    ElseIf aswTEMPS [iBATT_TEMP] > -1 Then
        Set wLED_U4.7
    ElseIf aswTEMPS [iBATT_TEMP] > -3 Then
        Set wLED_U4.6
    ElseIf aswTEMPS [iBATT_TEMP] > -5 Then
        Set wLED_U4.5
    ElseIf aswTEMPS [iBATT_TEMP] > -7 Then
        Set wLED_U4.4
    ElseIf aswTEMPS [iBATT_TEMP] > -9 Then
        Set wLED_U4.3
    ElseIf aswTEMPS [iBATT_TEMP] > -11 Then
        Set wLED_U4.2
    ElseIf aswTEMPS [iBATT_TEMP] > -13 Then
        Set wLED_U4.1
    ElseIf aswTEMPS [iBATT_TEMP] > -28 Then
        If bitFLASH = 1 Then
            Set wLED_U4.1
            Set wLED_U4.0
        EndIf
    Else
        Set wLED_U4.0
    EndIf
I can supply the asm files if it helps.
Thanks in advance.