Loading ...
Sorry, an error occurred while loading the content.

Struct with double "Non-continuable error"

Expand Messages
  • Sam Wetterlin
    I am encountering an error with a struct containing the type double . Researching the messages reveals other problems with doubles in the struct, but I did
    Message 1 of 1 , Dec 25, 2008
    • 0 Attachment
      I am encountering an error with a struct containing the type "double".
      Researching the messages reveals other problems with doubles in the
      struct, but I did not find this exact one.

      struct x, R as double, I as double

      x.R.struct=5 'This crashes and says "non-continuable error"
      x.R.struct=5.0 'Crashes the same way
      x.R.struct=5.1 'This works
      x.R.struct=5.1-0.1 'Crashes

      a=5
      x.R.struct=a 'Crashes

      Net effect, you can't assign an integer value to a double in a struct.
      This is manageable if you are assigning a literal value, because you
      can just add a tiny value. But for a generic assignment x.R.struct=a,
      where you don't know what a is in advance, adding a small value can
      end up turning a non-integer into an integer.

      My goal is to be able to represent complex numbers, and have functions
      to do basic complex math. I guess this bug rules out the STRUCT.

      Next stop, the array.

      Sam W.
    Your message has been successfully submitted and would be delivered to recipients shortly.