Couple of Questions

I just discovered this program the other day and I'm already obsessed with making tables! I have a couple of questions for those with more experience than myself. Sorry if they've been asked before!

First question: is it possible to output large numbers with commas, for example 1,000,000 instead of 1000000?

Second question: is there any downside to using leading zeros in a lookup table?

01-09:
10-99:
00100:

lines up much better in my text editor than

1-9:
10-99:
100:

Thank you!

Comments

  • Hi Melchior,

    This question's pretty old, so maybe you've found your answer by now. But if you still want to commify, here's something you can use:
    Table: Commify
    Set: inc=1
    Set: num=[{$1} >> reverse]
    Set: numlen = [{num} >> Length]
    [@CommifyLoop >> reverse]
    
    Table: CommifyLoop
    Set: inc={{inc}+3}
    Set: newnum={newnum}[{num} >> substr {{inc}-3} 3][when]{inc}<{numlen}[do],[@CommifyLoop&;#93;[end]
    {newnum}
    

    The code: [@Commify with 123456789]
    Produces: 123,456,789

Leave a Comment