Ok, cleaned it up a bit: \define hex2dec2(hex) <$vars myhex=<<__hex__>> myfilter="[split[]nth<place>search-replace:g[A],[10]search-replace:g[B],[11]search-replace:g[C],[12]search-replace:g[D],[13]search-replace:g[E],[14]search-replace:g[F],[15]]"> <$list filter="1 2 3 4" variable="place"> <$list filter=" [<myhex>subfilter<myfilter>] [<place>compare:number:eq[1]then[4096]else[1]] [<place>compare:number:eq[2]then[256]else[1]] [<place>compare:number:eq[3]then[16]else[1]] [<place>compare:number:eq[4]then[1]else[1]] +[product[]] "/> </$list> </$vars> \end \define hex2dec(hex) <$wikify text="<<hex2dec2 $hex$>>" name=dec> <$list filter="[enlist<dec>sum[]]"/> </$wikify> \end <<hex2dec FFFF>>
On Wednesday, December 2, 2020 at 2:21:30 PM UTC-8 coda coder wrote: > 10 is the sum of 1 2 3 4 -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7e7f496c-33db-4ef6-a97f-6934f2de0f7an%40googlegroups.com.