-- A few handlers for examining the contents of a lingo string. -- Good for looking at non-ascii chars on putHex thisStr put hex( thisStr ) end on hex thisStr -- Returns the chars of 'thisStr' as hex strings delimited by spaces set outStr = "" set strLength = length( thisStr ) repeat with i = 1 to strLength put charToHexByteStr( char i of thisStr ) & " " after outStr end repeat return outStr end on putDec thisStr put dec( thisStr ) end on dec thisStr -- Returns the chars of 'thisStr' as decimal strings delimited by spaces set outStr = "" set strLength = length( thisStr ) repeat with i = 1 to strLength put charToNum( char i of thisStr ) & " " after outStr end repeat put outStr return out end on charToHexByteStr theChar set decimalValue = charToNum( theChar ) set nibble1 = nibNumToNibChar( integer( decimalValue / 16 ) ) set nibble2 = nibNumToNibChar( decimalValue mod 16 ) return nibble1 & nibble2 end on nibNumToNibChar theNibble case TRUE of ( theNibble < 10 ): return string( theNibble ) ( theNibble < 16 ): return numToChar( theNibble + 55 ) otherwise alert "Nibble overflow." & theNibble end case end