none
assigning 1# to an array emelemt ? what is that? RRS feed

  • Question

  • looking at someones code to debug what does the A(3, 1) = 1# do?

    A(1, 1) = x1
    A(2, 1) = y1
    A(3, 1) = 1#
    A(1, 2) = x2
    A(2, 2) = y2
    A(3, 2) = 1#
    A(1, 3) = x3
    A(2, 3) = y3
    A(3, 3) = 1#

    Friday, December 29, 2017 8:10 PM

All replies

  • rob M,
    re:  A(3,1) = 1#

    It is a declaration that the value is a Double.
    I can't tell why it was used in the example.
    It can be used to prevent overflow errors when doing math with Longs or Integers.

    Data Type Symbols
     currency @
     double #
     Integer %
     long &
     single !
     string $

    '---
    Jim Cone
    Portland, Oregon USA
    https://goo.gl/IUQUN2 (Dropbox)
    (free & commercial excel add-ins & workbooks)
    Saturday, December 30, 2017 3:10 AM