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.
b = b + ...
Reply


Messages In This Thread
Variable stuck on 24 bits - by DimColby - 09-25-2023, 11:03 PM
RE: Variable stuck on 24 bits - by mnrvovrfc - 09-26-2023, 12:04 AM
RE: Variable stuck on 24 bits - by bplus - 09-26-2023, 12:11 AM
RE: Variable stuck on 24 bits - by DimColby - 09-26-2023, 01:28 AM
RE: Variable stuck on 24 bits - by SMcNeill - 09-26-2023, 12:25 AM
RE: Variable stuck on 24 bits - by DimColby - 09-26-2023, 12:58 AM
RE: Variable stuck on 24 bits - by SMcNeill - 09-26-2023, 02:16 AM
RE: Variable stuck on 24 bits - by DimColby - 09-26-2023, 06:31 AM
RE: Variable stuck on 24 bits - by SMcNeill - 09-26-2023, 12:31 AM
RE: Variable stuck on 24 bits - by SMcNeill - 09-26-2023, 02:20 AM
RE: Variable stuck on 24 bits - by bplus - 09-26-2023, 09:11 AM



Users browsing this thread: 1 Guest(s)