rlwhitcomb / utilities

Some of my personal utility programs
MIT License
2 stars 0 forks source link

Improve "getTreeText" in Calc to add indents for "if", "loop", etc. #635

Open rlwhitcomb opened 7 months ago

rlwhitcomb commented 7 months ago

For instance:

define to_excel_col(idx) -> {
 var col = ''
 var ix = idx - 1
 while ix >= 0 {
 col = chars (_A_ + ix % _BASE_) + col
 ix = ix \ _BASE_ - 1
}
 col
}

should look like this:

define to_excel_col(idx) -> {
   var col = ''
   var ix = idx - 1
   while ix >= 0 {
      col = chars (_A_ + ix % _BASE_) + col
      ix = ix \ _BASE_ - 1
   }
   col
}
rlwhitcomb commented 7 months ago

The next iteration should work the same whether the braces are present or not. This is probably more difficult ...