MISCELLANEOUS

Name

MISCELLANEOUS -- 

Function

nNumber             BIN2I(<cSignedInt>)
nNumber             BIN2L(<cSignedInt>)
nNumber             BIN2W(<cUnsignedInt>)
bCurrentErrorHandlerERRORBLOCK([<bErrorHandler>])
cHexStr             fn_Bin2I( <cBinStr> )
nValue              fn_Bin2I( <cBinStr> )
nResult             fn_clrbit( <nNum>, <nBit> )
nError              fn_error()
cBinStr             fn_Hex2Bin( <cHexStr> )
cBinStr             fn_I2Bin( <nValue>, [ <nLen> ] )
lInit               Fn_IPXInit()
lIs3X               fn_is3x()
lSet                fn_isbit( <nNum>, <nBit> )
nStatus             fn_isNet()
                    fn_NameL( cName, nRequiredLength)  => cReturn
cNewStr             fn_noNull( cStr )
cBinStr             fn_PeekStr( <nSegment>, <nOffset>, <nLength> )
xRet                fn_pfEval( xID, bBlock )
NIL                 fn_PokeStr( <nSegment>, <nOffset>, <cBinStr> )
nResult             fn_setbit( <nNum>, <nBit> )
nOldError           _fnSetErr( nErrCode )
cStrippedPath       Fn_SSFromP( <cFullPath>,<@cServerName> )
nResult             fn_togbit( <nNum>, <nBit> )
cBinaryInteger      I2BIN(<nInteger>)
cBinaryInteger      L2BIN(<nExp>)
nLastArgumentPos    PCOUNT()
nSourceLine         PROCLINE([<nActivation>])
cProcedureName      PROCNAME([<nActivation>])
cVersion            VERSION()

Description

Function FN_BIN2HEX()

  fn_Bin2I( <cBinStr> ) --> cHexStr
 

Internally, all information is stored as a series of bytes. When performing a direct read from memory, a character string will be returned. Use this function to convert that string to its hexidecimal numeric equivalent.

Function FN_BIN2I()

  fn_Bin2I( <cBinStr> ) --> nValue
 

Internally, all information is stored as a series of bytes. When performing a direct read from memory, a character string will be returned. Use this function to convert that string to its Clipper numeric equivalent.

This function only returns integer values.

Function FN_CLRBIT()

  fn_clrbit( <nNum>, <nBit> ) --> nResult
 

Clears a specified bit in a number.

Function FN_ERROR()

  fn_error() --> nError
 

Function FN_HEX2BIN()

  fn_Hex2Bin( <cHexStr> ) --> cBinStr
 

This function converts a hexidecimal value to it binary equivalent, and is useful for doing a direct memory translation.

Function FN_I2BIN()

  fn_I2Bin( <nValue>, [ <nLen> ] ) --> cBinStr
 

This function converts a decimal value to it binary equivalent, and is useful for doing a direct memory translation.

Function FN_IPXINIT()

  Fn_IPXInit() --> lInit
 

This function initializes an array in the library with the address of the IPX services. This function must be called before any of the IPX functions in this library can be performed.

[This function is meant to be part of a larger suite but the code wasn't ready by the release date. In its present form, it can be used to determine if IPX is installed, which might be useful.]

Function FN_IS3X()

  fn_is3x() --> lIs3X
 

A simple function that wraps around FN_GETFSI(). Determines whether or not the current server is a NetWare 3.x server or not.

Function FN_ISBIT()

  fn_isbit( <nNum>, <nBit> ) --> lSet
 

Determines if a specified bit in a number is set.

Function FN_ISNET()

  fn_isNet() --> nStatus
 

fn_isNet() provides a simple way to determine if the user running your program is logged in. if fn_isNet() == 0, she's in.

Function FN_NAMEL()

  fn_NameL( cName, nRequiredLength)  => cReturn
 

There are numerous places where a character string that is sent needs to be encoded with a leading BYTE specifying the length and may also need to be padded with NULLs.

A terminating null is guaranteed.

If the Length of cName is greater than nRequiredLength -1, it is truncated to leave room for the terminator.

Function FN_NONULL()

  fn_noNull( cStr ) --> cNewStr
 

Given a string <cStr>, fn_noNull() strips any trailing NULLs, [ chr(0) ] from the end. If there are no nulls, the entire string is returned.

Function FN_PEEKSTR()

  fn_PeekStr( <nSegment>, <nOffset>, <nLength> ) --> cBinStr
 

Use this function to perform memory reads of a contiguous block of memory. The string returned contains one character for each byte of memory read.

If you plan to perform consecutive memory reads from memory, for instance in filling an array, pass <nOffset> by reference to keep it updated in the calling routine.

Function FN_PFEVAL()

  fn_pfEval( xID, bBlock ) --> xRet
 

Some APIs require you to set to a preferred connection ID first before they can be executed. This call just simplifies the process of getting the old ID, setting the new one, doing something, then resetting the old ID.

This function records the state of fn_error() after evaluating the block and makes sure it stays that way before returning. Therefore, you can't really know whether or not the calls to change the preferred server back and forth are working or not, as there is no way to access their return values.

Function FN_POKESTR()

  fn_PokeStr( <nSegment>, <nOffset>, <cBinStr> ) --> NIL
 

Use this function to perform memory write to a contiguous block of memory.

If you plan to perform consecutive memory write to memory, for instance in copying an array of binary strings to memory, pass <nOffset> by reference to keep it updated in the calling routine.

Function FN_SETBIT()

  fn_setbit( <nNum>, <nBit> ) --> nResult
 

Sets a bit in a number.

Function _FNSETERR()

  _fnSetErr( nErrCode ) --> nOldError
 

Function FN_SSFROMP()

  Fn_SSFromP( <cFullPath>,<@cServerName> ) --> cStrippedPath
 

This function strips the server name from the specified path. If the path does not include a file server specification, then the function returns the original path.

Function FN_TOGBIT()

  fn_togbit( <nNum>, <nBit> ) --> nResult
 

Toggles bit <nBit> in number <nNum>.