Announcement

Collapse
No announcement yet.

Bit manipulations!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bit manipulations!

    Hey Tom or Lance,

    Can you with the comment SHIFT LEFT|RIGHT both operations
    (logic and Atrithemetic) the same for ROTATE?

    I found this statement very usefull for procesprogramming and it work very and very
    Are there statements for SET, RESET en TEST BIT, wich?

    Does the statements in all the compilers of PB? (PBDOS,PB/CC,PB/DLL)?

    Kind regards
    Stephane

    ------------------
    ICQ: 123632482

  • #2
    All PowerBASIC compiler offer ROTATE, SHIFT and BIT (set/reset/toggle) statement and bit test functions.

    They are also described in the documentation for each compiler.

    Thanks!




    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      hey Lance,

      Can you please fixed the error in the next updata/upgrade of PBDOS
      for the next statements BIN$(), HEX$(), OCT$()
      The PBDOS Compiler haven't specififying the number of digits but that fixed
      in the PBCC and PBDLL Compilers

      Thanks
      Stephane




      ------------------
      ICQ: 123632482

      Comment


      • #4
        It's on the list of additions for PB/DOS. In the mean time, use this simple function:
        Code:
        PRINT ZeroHex$(65535&,8)
         
        FUNCTION ZeroHex$(BYVAL Var&, BYVAL Digits%)
          FUNCTION = RIGHT$(STRING$(Digits%, "0") + Hex$(Var&), Digits%)
        END FUNCTION

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment

        Working...
        X