Resolved - Add calc command to Junco code

This simply uses the Perl eval command to process an arithmetic string.

Format: calc = arithmetic expression.

After the eval is processed, the calc command is surrounded with brackets and included in the output.

(5+3) / 2
= 4

440 * .4
= 176

440 * .6
= 264

7/5
= 1.4

Here's an intentional syntax error:

5(3
= arithmetic string could not be processed. syntax error at (eval 76) line 1, near "5("

Need to work out the formatting kinks a little, but if I want a quick calculation, this will suffice.

#junco - #resolved

From JR's : articles
96 words - 535 chars
created on
updated on - #
source - versions

Related articles
Commit to github - 10Oct2013 - Oct 10, 2013
Resolved - Add desc info to RSS feed - Aug 20, 2013
Resolved - Add the blog_ special tag for top-shelf formatted and display of blog posts - Jun 27, 2013
Do not create a hashtag link if tag is all numerics - Aug 07, 2013
Resolved - Add embed github code - Sep 24, 2013
more >>



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: May 14, 2024 - 8:48 a.m. EDT