@main[][tList;dLong;sErr] $tList[^table::create{sIP z 10.0.0.2 167772161 213.152.135.132 255.255.255.254 255.255.255.255 10.0.0..2 10.1 .10.1.1.1 10.1.1. z }] ^tList.menu{ $dLong[] $sErr[^safe{$dLong(^math:ip2long[$tList.sIP])}] }
IP ^^math:ip2long[IP] ^^math:long2ip(^^math:ip2long[IP])
$tList.sIP ^if(def $dLong){^dLong.format[%u]}{$sErr} ^if(def $dLong){^safe{^math:long2ip($dLong)}}{&mdash^;}
@safe[jCode] ^try{ $result[$jCode] }{ $exception.handled(1) $result[$exception.comment] }