result = (digits > 1)?(rand() * POW(10, digits - 1)) : (rand() * 9);
I don't think GM allows that. You can do lots of inline stuff, but not that I don't think.
You can do ++/-- in the newest version of GM, but I don't have it because many of the changes suck (their programmer logic is illogical: platform X can't handle this code, so we will remove it for all platforms). It irritates a LOT of people that you can't declare variable types. They're supposedly going to implement it in the next version. I really don't give a shit about trying to make GM noob-friendly. It's hardly noob-friendly as it is. You
must learn how to code in GM in order to make decent games in it, and even if you just rely on drag'n'drop you still need to
learn how to work within the constraints of the program. So I see no reason to cripple the program because certain aspects would not be useful to a complete newb. If they want to charge $100 for it, they should make it programmer-friendly, not idiot-friendly. Fuck the idiots. They can use RPG Maker.
Oh, there is a power() function in GM, but I was thinking when you convert it all into code, a repeat(x) call would be just about as fast as a power() call since all a power(x,y) does I would expect is multiply x times itself y-1 times in the same way as repeat(y)a*x.