home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
msdos
/
tex
/
webtp55.arc
/
SHIFTOPT.CHI
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1989-11-30
|
278 b
|
13 lines
@ @p
procedure ShiftOptDemo;
var
a,b: word;
Begin
a:= b mod 256; { using "/m" you get: a:= b and 255!}
a:= b mod 3; {unchanged}
a:= b div 4; { using "/d" you get: a:= b shr 2}
a:= b div 3; {unchanged}
a:= b shr 4 +1; {don't 'optimize' to a shr 5}
End;