|
|||||
|
||||||
Other Library Functions |
function |
netutil.net32 |
Library: Network utilities (OMNETUTIL)
Import: omnetutl.xmd |
netutil.net32
Use netutil.net32 to match a single 32-bit network-ordered number in a stream of bytes or octets.
The following program reads and outputs a sequence of network-ordered numbers from a file. (The file is created in the example program for netutil.to-net32
.)
import "omnetutil.xmd" prefixed by netutil. process repeat scan binary-mode file "net32.dat" match netutil.net32 => num output "d" % netutil.from-net32 num || "%n" again
Because the file stores the binary numbers in network order, it can be read on any platform with the same results.
Other Library Functions |
Copyright © Stilo International plc, 1988-2010.