Warning XS0165 Use of possibly unassigned local variable xxx
Posted: Tue Oct 01, 2024 7:34 pm
This is probably not preventable but basically the warning is incorrect:
Warning XS0165 Use of possibly unassigned local variable cXXX
Code:
I understand that I can prevent the warning by assigning some dummy value in the initialization but the warning is incorrect in the above code (The if..else..endif always runs, is not conditional)
Dick
Warning XS0165 Use of possibly unassigned local variable cXXX
Code:
Code: Select all
local cXXX as string
if (some condition)
cXXX:="A"
else
cXXX:="B"
endif
Dick