Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dim number (2000 sr-1)

    if i want to use MY_Var in an aritmetical operation how to dim it?:
    long, integer, double....????

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dim number (2000 sr-1)

    It depends. If you work with whole numbers only (for example 37, -116 or 2345678), you can use

    Dim my_Var As Long

    If the number may contain a fractional part (for example 12.5 or -0.0056), you can use

    Dim my_Var As Double

    If the number represents an amount of money (for example

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: dim number (2000 sr-1)

    if i want calculate fifference with this two number if i have understand Dim is Double, or not?
    -1.059.150,51
    1.059.150,51

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dim number (2000 sr-1)

    I assume that you use the comma as decimal separator.
    In general, one would use Double as data type for such numbers, but if they are amounts of money, you may prefer to use Currency.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •