Hi, this is my first post on this great site. I have started playing around with the desktop version and am trying to make a loan formula, but I must be getting the syntax wrong.
Trip the formula and use msgboxs to show the current result...
Some thing like this:
B4X:
Payment=(1 + RATE)* (-1) 'This should be the critic part, if you can pass this then all ok...
MSGBOX(payment)
Payment=(Payment+Rate) 'I don't know how you are implemeting the rate...But you should not introduce a percentage in a direct calculation...
MSGBOX(payment)
Payment = Payment * Principal
If I recal correctly, from my math lessons, multiplying by a negative number is equal to dividing by that absolut number(?)
Rate SHOULD not be in percentage, but represent the ratio...
There's no need to "Dim" normal variables....
You can just use the without previous settings...
If you need to share a variable bettween several subs, then put them in the Global sub, like this: