@gruff said:
Perhaps I am just a raw beginner myself but it appears that in his original snippet meeta is setting @M = bending.
Shouldn't that be @M = result?
yes your absolutely true.. i corrected that in my code and yet its showing the same results.. and besides if it were to be 0 then @M / 'anything ' = NaN? there is some problem there.. but I got a newer problem after sorting that out.. this is more interesting i reckon.. please have a look at this
@b = 300
@h = 280
weight =((25.0*@b*@h) / 10**6)
prompts = ["Variable Load(kN/m) ", "Permanent Load(kN/m) ", "Max Moment known(Nmm)"]
loads = [0.0, 0.0, 0.0] #At this point enter 21, 50.1 and 0
results = inputbox prompts, loads, "Loads apart from Self-weight/ Or if moment is known, Please enter"
variable_load, permanent_load, moment = results
if (moment != 0)
@M = moment
else
uls = (1.35*variable_load + 1.5*permanent_load + 1.5*weight)*@length
UI.messagebox(@M)
UI.messagebox(weight)
UI.messagebox(results)
@M = 0.11*uls*@length
@shear = 0.60 * uls
UI.messagebox(uls)
UI.messagebox(@M)
end
I don't know why, the weight that it should be showing is 2.1, but its showing 0.0032 something at the very beginning of the code.. its really taking a toll on me now! I know that many UI boxes is absolutely silly but that's my way of debugging because I know no other way! pls recommend any other method for debugging!