I have been reading the manual of BlitzMax, which is a LInux/WIndows adaption of the Amiga Blitz2 Basic Compiler system. I hoped that maybe some Blitz2 source code could be adapted for a modern QL system.
I came across a Blitz2 Function: SHR - Bitwise 'Shift right' binary operator
Shr is a binary operator that performs the shift to right function.
Which does not exist in SBASIC, so I thought maybe a FuNction would solve this, my feable attempt:
Code: Select all
100 DEFine FuNction SHR (num)
110 LOCal num$
120 num$=BIN$(num,8)
130 RETurn "0" & num$( TO LEN(num$)-1)
140 END DEFine SHR