Rusty Well-Known Member Licensed User Longtime User May 13, 2013 #1 I am receiving very many unused variable (warning #9) warnings I've checked each of these and find that the variables are definitely used. For example: Code: Copy Dim ThisHeight As Int = rc.Height If rc.Height < 1 Then 'in case the height wasn't set rc.Height = RowHeight ThisHeight = RowHeight + 20 End If The variable ThisHeight is flagged as unused. Can you explain? Thanks, Rusty
I am receiving very many unused variable (warning #9) warnings I've checked each of these and find that the variables are definitely used. For example: Code: Copy Dim ThisHeight As Int = rc.Height If rc.Height < 1 Then 'in case the height wasn't set rc.Height = RowHeight ThisHeight = RowHeight + 20 End If The variable ThisHeight is flagged as unused. Can you explain? Thanks, Rusty
Erel B4X founder Staff member Licensed User Longtime User May 13, 2013 #2 This warning means that the variable is only assigned a value. It is never used. You can delete this variable (and the places it is assigned values) and everything will work. Note that the very useful "Find all references" tool can help you diagnose this situations. Click on the variable and press F7. You will see that this variable is only assigned.
This warning means that the variable is only assigned a value. It is never used. You can delete this variable (and the places it is assigned values) and everything will work. Note that the very useful "Find all references" tool can help you diagnose this situations. Click on the variable and press F7. You will see that this variable is only assigned.