I just saw this site 10min. ago. The thread on creating a range of numbers with
regular intervals intrigued me, so I hacked this together. Might be useful?
I start by creating a list of numbers, then I find the number of intervals I
need. By *+ the numbers I get a faily large interval list wich I again * with
my count property. Then i cut off the un-needed bits. Find the trailing values
if any, and implode the result.
I haven't tested this much, (Just opened it in a browser, once) But the theory
is solid.
I just saw this site 10min. ago. The thread on creating a range of numbers with regular intervals intrigued me, so I hacked this together. Might be useful?
I start by creating a list of numbers, then I find the number of intervals I need. By *+ the numbers I get a faily large interval list wich I again * with my count property. Then i cut off the un-needed bits. Find the trailing values if any, and implode the result.
I haven't tested this much, (Just opened it in a browser, once) But the theory is solid.
Values := "0":"1":"2":"3":"4":"5":"6":"7":"8":"9"; Range := @Integer(TotalHits/Count); Scope := @SubSet( @TextToNumber(Values*+Values)*Count; Range ); Remainder := @Modulo(TotalHits;Count); LastEntry := @Subset(Scope;-1)+Count; Trailing := @If(Remainder>0; " | " +@Text(LastEntry)+ "-" +@Text(LastEntry+Remainder); ""); @Implode( @Text(Scope+1)+ "-" +@Text(Scope+Count); " | " ) + Trailing;
Regards, and keep on hacking. Jens. caustics@themax.org - www.themax.org