in reply to Re: All Calculations Done with One Variable Give Integer Answers
in thread All Calculations Done with One Variable Give Integer Answers

I'm not using integer.

If a subroutine in someone else's module uses it, or if they use int(), would convert it to an integer and force all math with it from then on to yield an integer result? If so, how can I undo that?

  • Comment on Re^2: All Calculations Done with One Variable Give Integer Answers

Replies are listed 'Best First'.
Re^3: All Calculations Done with One Variable Give Integer Answers
by BrowserUk (Patriarch) on Sep 23, 2013 at 17:21 UTC
    If a subroutine in someone else's module uses it, or if they use int(), would convert it to an integer and force all math with it from then on to yield an integer result?

    No, to either or both.

    However, unless you do division (or subtract a fractional value) results will be integers. But you probably realise that.

    Unless the variable in question is being tied some how, this sounds more likely to be a problem with how you are displaying the value rather than a scalar magically becoming strictly integer.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.