Hi,

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)
Also, I need global variable in my case. I am not seeking to replace global by local variables in the solution I am looking for. Thanks a lot in advance.

Can anyone help? Thanks.