Red Lion - Crimson 3.0 Function Library

This database contains many great programming snippets that you will find helpful when programming.  


This database does not contain any communications configurations or screens.  You will find samples in the "Programs" section that can be used in Crimson databases that you are developing including:

  • IntToChar - Converts an integer into an ASCII character
  • SecsToTimeString - Converts a value in seconds to a string formatted "hh:mm:ss"
  • CurrentDateString - Converts current date into a string formatted as "MM/DD/YY" or "MM/DD/YYYY"
  • CurrentTimeString24 - Converts current time into a string formatted as 24 hour "hh:mm:ss"
  • CurrentTimeString12 - Converts current time into a string formatted as 12 hour "hh:mm:ss"
  • StringInString - Finds Str2 in Str1, returns position of Str2, or -1 if it cannot find a match
  • SeekFile - Reads the contents of a file on the CompactFlash card
  • TimeString - Returns a time string in "hh:mm:ss" based off of individual hour, minute, and second tags
  • DateString - Returns a date string in "mm:dd:yy" based off of individual month, day, and year tags
  • SpaceOutString - Spaces out a string to a specific number of characters
  • SpaceOutString_Center - Centers a string
  • RoundInt - Rounds a real number before converting it to an integer
  • ScaleReal - Scales a raw value to a real number between a minimum and maximum value
  • AddrToText - Converts a hex IP address to a dotted decimal
  • BCDtoDEC - Converts a BCD number to a decimal number
  • WriteToLine - Writes a line to a file on the Compactflash card
  • AllCaps - Capitalizes all the characters of a string

This is a conversion of a Crimson 2.0 (cd2) file that was provided by Red Lion in 2009