As you know, in some cases local static variables would be very useful, to avoid using global module variables; this is a recent post in which you could use them:
https://www.b4x.com/android/forum/threads/add-currency-format-for-edittext.80836/#post-512379
https://www.b4x.com/android/forum/threads/add-currency-format-for-edittext.80836/#post-512379