swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   from-net-long   Available in:
Professional
Enterprise

Library: omnetutl - miscellaneous network utilities
Include: omnetutl.xin
Return type: Integer
Returns:       

An integer value.


Declaration

  from-net-long (n)
  where
n
a sequence of bytes or octets that encode a long network number


Purpose

Use from-net-long to convert the bytes of a long network number into an integer.

Requirements

You must include the following line at the beginning of your OmniMark program:

    include "omnetutl.xin"

Usage Notes

The network number is a sequence of bytes, not a base-10 number.

Example


  ;  translate the four-byte network number "1234" into an integer
  include "omnetutl.xin"

  process

  ;     where "%1#" represents a byte with the value of 1
     local stream network-bytes initial {"%1#%2#%3#%4#"}
     local integer host-long

     set host-long to from-net-long ( network-bytes )
     output "d" % host-long

        Other Library Functions
   from-net-long
   NETGetHostIP
   NETGetHostName
   NETIsVersionCompatible
   NETLibraryVersion
   net-long
   to-net-long
 
----  

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

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:19 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.