overflow checking

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sean Capstick

    overflow checking

    Is there a way to stop overflow checking at runtime in VB.NET? I have one
    math calculation that must behave like another system, it could generate a
    number > 2 billion (<4) which then needs to go into a signed 32 bit integer.
    I don't want to disable it for the entire program though, just at one spot.

    Thanks,
    Sean



  • Raymond Lewallen

    #2
    Re: overflow checking

    Sean,

    Go to Project Properties, Configuration Properties, Optimizations and check
    the box that says "Remove Integer Overflow Checks"

    HTH,

    Raymond Lewallen

    "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
    news:epPVhgKHEH A.2260@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Is there a way to stop overflow checking at runtime in VB.NET? I have one
    > math calculation that must behave like another system, it could generate a
    > number > 2 billion (<4) which then needs to go into a signed 32 bit[/color]
    integer.[color=blue]
    > I don't want to disable it for the entire program though, just at one[/color]
    spot.[color=blue]
    >
    > Thanks,
    > Sean
    >
    >
    >[/color]


    Comment

    • Raymond Lewallen

      #3
      Re: overflow checking

      Sean,

      Go to Project Properties, Configuration Properties, Optimizations and check
      the box that says "Remove Integer Overflow Checks"

      HTH,

      Raymond Lewallen

      "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
      news:epPVhgKHEH A.2260@TK2MSFTN GP09.phx.gbl...[color=blue]
      > Is there a way to stop overflow checking at runtime in VB.NET? I have one
      > math calculation that must behave like another system, it could generate a
      > number > 2 billion (<4) which then needs to go into a signed 32 bit[/color]
      integer.[color=blue]
      > I don't want to disable it for the entire program though, just at one[/color]
      spot.[color=blue]
      >
      > Thanks,
      > Sean
      >
      >
      >[/color]


      Comment

      • Sean Capstick

        #4
        Re: overflow checking

        But that removes it from the entire project does it not?

        Sean
        "Raymond Lewallen" <Raymond.CTR.Le wallen@nospam.f aa.gov> wrote in message
        news:O4$oV1KHEH A.3500@TK2MSFTN GP10.phx.gbl...[color=blue]
        > Sean,
        >
        > Go to Project Properties, Configuration Properties, Optimizations and[/color]
        check[color=blue]
        > the box that says "Remove Integer Overflow Checks"
        >
        > HTH,
        >
        > Raymond Lewallen
        >
        > "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
        > news:epPVhgKHEH A.2260@TK2MSFTN GP09.phx.gbl...[color=green]
        > > Is there a way to stop overflow checking at runtime in VB.NET? I have[/color][/color]
        one[color=blue][color=green]
        > > math calculation that must behave like another system, it could generate[/color][/color]
        a[color=blue][color=green]
        > > number > 2 billion (<4) which then needs to go into a signed 32 bit[/color]
        > integer.[color=green]
        > > I don't want to disable it for the entire program though, just at one[/color]
        > spot.[color=green]
        > >
        > > Thanks,
        > > Sean
        > >
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Sean Capstick

          #5
          Re: overflow checking

          But that removes it from the entire project does it not?

          Sean
          "Raymond Lewallen" <Raymond.CTR.Le wallen@nospam.f aa.gov> wrote in message
          news:O4$oV1KHEH A.3500@TK2MSFTN GP10.phx.gbl...[color=blue]
          > Sean,
          >
          > Go to Project Properties, Configuration Properties, Optimizations and[/color]
          check[color=blue]
          > the box that says "Remove Integer Overflow Checks"
          >
          > HTH,
          >
          > Raymond Lewallen
          >
          > "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
          > news:epPVhgKHEH A.2260@TK2MSFTN GP09.phx.gbl...[color=green]
          > > Is there a way to stop overflow checking at runtime in VB.NET? I have[/color][/color]
          one[color=blue][color=green]
          > > math calculation that must behave like another system, it could generate[/color][/color]
          a[color=blue][color=green]
          > > number > 2 billion (<4) which then needs to go into a signed 32 bit[/color]
          > integer.[color=green]
          > > I don't want to disable it for the entire program though, just at one[/color]
          > spot.[color=green]
          > >
          > > Thanks,
          > > Sean
          > >
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Raymond Lewallen

            #6
            Re: overflow checking

            Sean,

            Yes, sorry about that. I forgot you didn't want to remove it from the
            entire project. In your case, I'm not sure it can be done. You might look
            at removeintchecks compiler option, although I still don't think its going
            to help you solve what you want to do. I'm pretty sure that does the same
            thing as going in and checking that box, but I haven't really looked into
            it.

            HTH,

            Raymond Lewallen

            "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
            news:OhfVc8KHEH A.2688@tk2msftn gp13.phx.gbl...[color=blue]
            > But that removes it from the entire project does it not?
            >
            > Sean
            > "Raymond Lewallen" <Raymond.CTR.Le wallen@nospam.f aa.gov> wrote in message
            > news:O4$oV1KHEH A.3500@TK2MSFTN GP10.phx.gbl...[color=green]
            > > Sean,
            > >
            > > Go to Project Properties, Configuration Properties, Optimizations and[/color]
            > check[color=green]
            > > the box that says "Remove Integer Overflow Checks"
            > >
            > > HTH,
            > >
            > > Raymond Lewallen
            > >
            > > "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
            > > news:epPVhgKHEH A.2260@TK2MSFTN GP09.phx.gbl...[color=darkred]
            > > > Is there a way to stop overflow checking at runtime in VB.NET? I have[/color][/color]
            > one[color=green][color=darkred]
            > > > math calculation that must behave like another system, it could[/color][/color][/color]
            generate[color=blue]
            > a[color=green][color=darkred]
            > > > number > 2 billion (<4) which then needs to go into a signed 32 bit[/color]
            > > integer.[color=darkred]
            > > > I don't want to disable it for the entire program though, just at one[/color]
            > > spot.[color=darkred]
            > > >
            > > > Thanks,
            > > > Sean
            > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Raymond Lewallen

              #7
              Re: overflow checking

              Sean,

              Yes, sorry about that. I forgot you didn't want to remove it from the
              entire project. In your case, I'm not sure it can be done. You might look
              at removeintchecks compiler option, although I still don't think its going
              to help you solve what you want to do. I'm pretty sure that does the same
              thing as going in and checking that box, but I haven't really looked into
              it.

              HTH,

              Raymond Lewallen

              "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
              news:OhfVc8KHEH A.2688@tk2msftn gp13.phx.gbl...[color=blue]
              > But that removes it from the entire project does it not?
              >
              > Sean
              > "Raymond Lewallen" <Raymond.CTR.Le wallen@nospam.f aa.gov> wrote in message
              > news:O4$oV1KHEH A.3500@TK2MSFTN GP10.phx.gbl...[color=green]
              > > Sean,
              > >
              > > Go to Project Properties, Configuration Properties, Optimizations and[/color]
              > check[color=green]
              > > the box that says "Remove Integer Overflow Checks"
              > >
              > > HTH,
              > >
              > > Raymond Lewallen
              > >
              > > "Sean Capstick" <scapstick.nosp am@dimensions.c a> wrote in message
              > > news:epPVhgKHEH A.2260@TK2MSFTN GP09.phx.gbl...[color=darkred]
              > > > Is there a way to stop overflow checking at runtime in VB.NET? I have[/color][/color]
              > one[color=green][color=darkred]
              > > > math calculation that must behave like another system, it could[/color][/color][/color]
              generate[color=blue]
              > a[color=green][color=darkred]
              > > > number > 2 billion (<4) which then needs to go into a signed 32 bit[/color]
              > > integer.[color=darkred]
              > > > I don't want to disable it for the entire program though, just at one[/color]
              > > spot.[color=darkred]
              > > >
              > > > Thanks,
              > > > Sean
              > > >
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              Working...