swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

netutil.to-net32

 
 

Library: Network utilities (OMNETUTIL)
Import: omnetutl.xmd
Return type: Integer

Returns: Returns a number encoded as a 32-bit binary value, with the bytes in network order.


Declaration

netutil.to-net32 c

Argument definitions

c
is an integer value


Purpose

Use netutil.to-net32 to translate an integer value into a sequence of bytes/octets that is the integer value's long network number encoding.

Example

This program creates a file containing the numbers from 0 to 1,000,000 (counting by 1,000s). It stores the numbers in network-ordered binary format, to create a smaller, platform-independent file.

  import "omnetutil.xmd" prefixed by netutil.
  
  process
     using output as file "net32.dat" with binary-mode
        repeat for integer i from 0 to 1000000 by 1000
           output netutil.to-net32 i
        again
     close s

This file can be read on any platform, with the same results.

        Other Library Functions
   netutil.from-net32
   netutil.host-ip
   netutil.host-name
   netutil.net32
   netutil.omnetutil-version
   netutil.to-net32
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.