CoC_LIBNUMSYS

Author: bn880, CoC
Date: 2003/11/14

Overview
Loading the library
List of functions
List of resources
Description
History


Overview

The CoC Number System library provides a number of functions that are capable of converting between various number systems such as Hex, Binary, Octal, and Alphanumeric.  The Library also provides functions which allow the creation of new number systems using custom symbols, and some array and variable checking functions.
 

Version: 1.05
Dependencies: none
Included in: CoC Network Services & Addon , CoC Public Array

DOWNLOAD

Loading the library

To load the library execute:
call preprocessFile "numSys/numSys.sqf"
The global variable CoC_LIBNUMSYS equals 1.05 if the library is loaded.

List of functions

fAlphaAToDec
fAlphaAToDecA
fASCIIAToDec
fASCIIAToDecA
fBinaryAToDec
fBinaryAToDecA
fCharsAToNum
fDecToAlpha
fDecToAlphaA
fDecToASCII
fDecToASCIIA
fDecToBinary
fDecToBinaryA
fDecToDecA
fDecToHex
fDecToHexA
fDecToOct
fDecToOctA
fGetIndex
fHexAToDec
fHexAToDecA
fNumBaseConvert
fNumToChars
fNumToCharsA
fOctAToDec
fOctAToDecA
funDefined
funGetIndex
funGetIndexR
funGIR
funGetType

List of Resources

rUnsCharChar
rUnsCharName

Description

This library allows OFP scripters to easily and quickly convert any positive integer number from Alphanumeric, ASCII, Binary, Hexadecimal, Octal, number or symbol system to any other.  Due to the limitations of the OFP scripting engine, all numbers in systems other than decimal (base 10) need to be passed in as arrays of characters.  The library will also allow for very fast creation of a different number system and conversion using it by providing the fCharsAToNum function with a different character or symbol set.

History

1.05

Version handling routines added.

1.04
Improved: all function performance
Added functions:
funDefined
funGetIndex
funGetIndexR
funGIR
funGetType

1.03
Fixed: header definition

1.02
Added functions
fGetIndex
fAlphaAToDec
fAlphaAToDecA
fASCIIAToDec
fASCIIAToDecA
fBinaryAToDec
fBinaryAToDecA
fHexAToDec
fHexAToDecA
fOctAToDec
fOctAToDecA
fDecToDecA
fCharsAToNum
fDecToASCII
fDecToASCIIA

1.01
Fixed: serious problems with scope of variables in functions fixed.