«Illustrates the new bit verbs in Frontier 3.0
local (i, x)
for i = 0 to 31 «turn on 1 bit, display result in hex
x = bit.set (0, i)
if not bit.get (x, i)
scriptError ("The bit didn't get set.")
msg (string.hex (x))
x = 0
for i = 0 to 31 «turn on each bit in acum, display result in hex
x = bit.set (x, i)
if not bit.get (x, i)
scriptError ("The bit didn't get set.")
msg (string.hex (x))
for i = 0 to 31 «clear each bit in acum, display result in hex
x = bit.clear (x, i)
if bit.get (x, i)
scriptError ("The bit didn't get cleared.")
msg (string.hex (x))
This page was last built on Sat, Aug 16, 1997 at 6:32:50 PM. You can download the current set of sample scripts from our FTP site. Dave |