If I have 100 shares in total issued, 1 single share sold and 1 BTC on my GLBSE account:
Will "bmc.py pay [SHARENAME] [100 BTC]"
a) fail, because I don't have 100 BTC in my account to split amongst all shareholders (me and the holder of the 1 external share)
b) send the 1 BTC to the holder of the 1 external share, setting my account balance to 0
c) try to send 100 BTC to the holder of the 1 external share and fail
My expected behaviour would be b), but better be safe than sorry!
[edit: or a), though that could be (nearly) circumvented by sending 100 times 1 BTC (as I would only need a second BTC on my account then), so it would only spam your platform with no different outcome]
Also, how is rounding done?
I might just only send out amounts that are divisible by [amount of total shares] to be sure...
If you do not have enough funds to make the payment it will fail as payment is carried out right away, so it will check your account to see if you have enough funds.
If you had enough funds in your account to make the payment then it would pay 100btc to the single external share.
The system doesn't do rounding, it will try to divide the amount by the number of shares, and give an integer. If it's not exact then the remainder will be left in your account, so you don't need to worry about making an exact payment, you just tell the system what you want to pay and it will do it's best so that everyone gets the same with the remainder being left in the account.
Generally the system tends to return errors when state is not as expected (for example you try to pay 100btc but only have 1btc in your account).