Hello wanna_code_perl,

Just a thought: Why not build your own Calculator?

Back in the '80s I used 'C' to build a calculator for common things I needed for system administration activities. Each time I'd be called upon to change/fix/... a different system (mostly AIX systems), I would port my calculator to the new system. This had lots of problems since the 'C' compilers were always changing and not always available, but all the systems had Perl. So after becoming more familiar with Perl, I slowly ported each calculator function into a small script I called 'calc.plx' that used the standard system Perl, which called itself to do the calculations as a long one liner.

The script grew to about 700 lines, and with a lot of comments, but it does exactly what I need it to do. and far exceeds what I could have done with the original 'C' calculator.

Since you are writing one-liners anyway, why not copy them into your 'calc.plx' and build a way to call them. You will be amazed at how much fun adding functions can get once you have your own foundation script.

Good Luck...Ed

"Well done is better than well said." - Benjamin Franklin


In reply to Re: Simple algebraic calculations by flexvault
in thread Simple algebraic calculations by wanna_code_perl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.