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

netutil.to-net32

 
 

Library: Net, 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
     local stream s
     open s with binary-mode as file "net32.dat"
     using output as s
        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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:33 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.