I am trying to define a local variable based on the last character of global variable (M_crisis_* or M*) being an odd or even number:
Code:
local M_benchmark $M_crisis_5 *local M_benchmark $M4 *local M_benchmark $M_crisis_7 *** What I am trying to do: * if the last character of {$M_crisis_5 , $M4, $M_crisis_7} if an odd number, in this case 5 or 7, then: * local t = odd + 2 (in this case: 5+2 or 7+2) * if the last character of {$M_crisis_5 , $M4, $M_crisis_7) if an even number, in this case 4, then: * local t = even + 1 (in this case 4+1)
Can anyone help? Thanks.
0 Response to local variable definition based of last character of string variable being odd or even
Post a Comment