Menu

Set bit of a byte

Help
Rox
2019-09-06
2019-09-06
  • Rox

    Rox - 2019-09-06

    these lines results in error " Error: Incorrect parameters in Set, expected: Set variable.bit status"

       dim Flags    as Byte
        #define fRunning   flags.0
        set fRunning
    

    These lines compiled succesfully:

       dim Flags    as Byte
        #define fRunning  flags.0
        fRunning = 1 
    

    Is that normal?

    Thank you,
    Rox

     

    Last edit: Anobium 2019-09-06
  • Anobium

    Anobium - 2019-09-06

    Hello Rox

    I edited your post.. the CRLF were missing.

    Your use of set fRunning is missing the assignment of off or on.
    Your use of fRunning = 1 is correct.

    Make sense? Set something ON or OFF. Also, see the Help at http://gcbasic.sourceforge.net/help/_set.html

     
  • Rox

    Rox - 2019-09-06

    Thanks! for the fast response. i got it.

     
  • Anobium

    Anobium - 2019-09-06

    No problem

     

Log in to post a comment.