Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable stuck on 24 bits
#11
Quote:I see what I did. I was misusing the DIM...AS... statement with a variable list. It's something I remember from way back, using that with lists of variables can give unexpected results and it's safer and no more difficult to declare variables one at a time. Thanks again!

Now you can say the DIM AS TYPE and then do a list for that type eg

```Dim As Long MyLong1, MyLong2, MyLong3 ' <<< all 3 are long```

```
Type MyType
As Integer x, y, z
As _Unsigned Long fg, bg
End Type```

But Yes when you list variables signally line by line you can also document their purpose with comments! Good programming practice specially for big projects.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  for performance, what's the best variable type to use for boolean _TRUE & _FALSE ? madscijr 12 1,228 09-29-2025, 02:59 PM
Last Post: dakra137
  DIM - AS - VARIABLE TYPE likely bug bartok 25 5,424 05-06-2024, 08:21 PM
Last Post: SMcNeill
  When MUST a variable be an Integer? Dimster 3 868 04-27-2024, 07:04 PM
Last Post: TerryRitchie
  How to reorder string variable x factorial different ways? Circlotron 13 2,617 04-27-2024, 02:43 AM
Last Post: PhilOfPerth

Forum Jump:


Users browsing this thread: