Menu

Do bit variables need to be dimensioned?

Help
2019-12-22
2019-12-22
  • Jack Hoffnung

    Jack Hoffnung - 2019-12-22

    I know that byte variables don't need to be dimensioned but larger variables do. Do bit variables need to be dimensioned?

     
  • Chris Roper

    Chris Roper - 2019-12-22

    Yes becouse the default for non dimensioned variables is always Byte.
    It is good practice to use:

    #option explicit 
    

    and then declare all of the variables and types you intend to use including Byte.
    It will then flag unknown variables as an error and save hours of debugging due to spelling mistakes or incorrect type definitions.

    Cheers
    Chris

     

    Last edit: Chris Roper 2019-12-22

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.