home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
POINT Software Programming
/
PPROG1.ISO
/
pascal
/
swag
/
numbers.swg
/
0003_BIT_GET.PAS.pas
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
227 b
|
11 lines
{ You can use multiplies of 2 like: }
Function Find_Bit(B, c : Byte) : Byte;
{c is the position c=0 far right c=7 far left
returns 0 or 1}
begin
if b MOD (b shl c) = 0 then Find_Bit := 0
else Find_Bit := 1
end;