search for: flagmean

Displaying 1 result from an estimated 1 matches for "flagmean".

2006 Aug 17
2
Creating function name from variables..
...%> Now, I want to call a custom format function that translates the rating into things like ''Good'', ''Bad'', ''Ugly'' and also sends back the value of the result[e] above into the correct format. So, I have helpers for each of the fields. FLAGMEAN = [ " ", "!", "+", "-", "*" ] unless const_defined?("FLAGMEAN") def format_abc(val, flag) a = sprintf ("%.1f",(val/ 10.0)) b = FLAGMEAN[flag] return a, b end def format_def(val, flag) a = sprintf (...