Sometimes you may want to break up the IP address into the individual octets and then do some sort of compare. Remember that the IP is a string vartype and the above code example retains the string format.  It is not advisable to do '>=' or '<=' compares with strings as you may have unexpected results. Better to convert the strings to numeric with Val().
code:
$1st = VAL(SUBSTR(@IPAddress0,1,3))
$2nd = VAL(SUBSTR(@IPAddress0,5,3))
$3rd = VAL(SUBSTR(@IPAddress0,9,3))
$4th = VAL(SUBSTR(@IPAddress0,13,3))
If doing any subnet calculating that is more complex than a single octet compare, take a look at the various subnet UDFs that have been posted. See also, sealeopard's FAQs on the topic. This is the first in a series of three:
Topic: TCP/IP Primer, Part I - IP Addresses
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.