Module:Sharpness documentation: Difference between revisions
Address missing sharpness-(+/-1) cases. Try to improve this insanely poorly documented code using more descriptive variable names |
Missing sharpness-(-2) |
||
| Line 46: | Line 46: | ||
out_str = out_str .. " This symbol set " | out_str = out_str .. " This symbol set " | ||
if s == 1 then | if math.abs(s) == 1 then | ||
out_str = out_str .. "is identical to standard notation." | out_str = out_str .. "is identical to standard notation." | ||
elseif s == 2 then | elseif math.abs(s) == 2 then | ||
out_str = out_str .. "comprises sharps, flats, and Stein–Zimmerman [[24edo#Notation| | out_str = out_str .. "comprises sharps, flats, and Stein–Zimmerman [[24edo #Notation|quartertone]] accidentals." | ||
else | else | ||
if extension == "" then | if extension == "" then | ||
out_str = out_str .. "[[ups and downs notation]] and comprises sharps, flats, " | out_str = out_str .. "[[ups and downs notation]] and comprises sharps, flats, " | ||
.. (s % 2 == 0 | .. (s % 2 == 0 | ||
and "naturals, and Stein–Zimmerman [[24edo #Notation| | and "naturals, and Stein–Zimmerman [[24edo #Notation|quartertone]] accidentals " | ||
or "and naturals ") | or "and naturals ") | ||