devxlogo

July 3, 1999

BinToDec – Convert from binary to decimal

‘ convert from binary to decimal” NOTE: requires Power2()Function BinToDec(value As String) As Long Dim result As Long, i As Integer, exponent As Integer For i = Len(value) To 1

GetUNCName – Convert a file path to a UNC path

‘ Converts a reference to a file in the standard Windows’ format (e.g. “H:ServerDirFilename.ext”) in the corresponding UNC’ format (e.g. “\ServerNameExportedDirServerDirFileName.txt”)” It turns to be very useful when a program

Bin – Convert from decimal to binary

‘ convert from decimal to binary’ if you pass the Digits argument, the result is truncated’ to that number of digits” NOTE: requires Power2()Function Bin(ByVal value As Long, Optional digits

InstrRev – Backward Instr for VB4 and VB5

‘ A clone of VB6’s InstrRev function (including its quirks)’ that works under VB4 and VB5Function InstrRev(StringCheck As String, StringMatch As String, _ Optional Start As Long = -1, Optional

Converting a time_t Value to a tm Struct

For humans, the time_t value is unintelligible. The Standard Library defines the struct tm that can represent date and time in a more readable form. The struct tm is declared