What you're running into is the issue with macros. Macros are evaluated at 
render time, as a strict text replacement.  So <<calc !!order /7 
decimals:2>> puts the text of the field order (not the resolved value) in 
place of !!order.  Therefore, you're code becomes <<calc <<calc !!foo + 
by:!!bar>> /7 decimals:2>>.  Since TiddlyWiki doesn't support macros 
embedded in macros, calc is trying to process the string "<<calc !!foo + 
by:!!bar>>" divided by 7.  And of course, you can't divide that string by 
7, so it says the answer is NaN.  

Unfortunately, there's not a great answer to how to fix this.  I would look 
into using Tobias' eval <http://tobibeer.github.io/tw5-plugins/#eval> widget 
in place of his calc macro.  widgets do support embedding one widget inside 
another, so you would be able to transclude one expression inside another 
and it would resolve the result of the transcluded expression before 
evaluating the outer expression.  Beyond that, perhaps Tobias can chime in 
with any suggestions he may have.  

Matt

On Friday, March 11, 2016 at 4:42:17 AM UTC-5, Mr. Mal wrote:
>
>  Hello everyone.
>
> I try to make some calculation using calc 
> <http://tobibeer.github.io/tb5/#calc> macro by TB. But connot figure out 
> how to solve this problem.
>
> see image below. TQ
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6a07b861-7abc-423f-8a2e-c4a7f6aaaafe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to