Instructions

353 C-Control Pro IDE
© 2013 Conrad Electronic
set of offset. The offset parameter is used to change a string after a specified number (offset) of characters
and leave the beginning of the string intact.
Parameter
n integer number
text pointer to destination string
offset offset that is applied to the position where the string is copied
If offset has the value STR_APPEND (ffff Hex) then the length of the destination string is assumed as
offset. In this case the source string is copied behind the destination string.
5.24.14 Str_WriteWord
String Functions
Syntax
void Str_WriteWord(word n, byte base, char text[], word offset, byte
minwidth);
Sub Str_WriteWord(n As Word, base As Byte, ByRef text As Char ,offset As
Word, minwidth As Byte)
Description
The word n is converted to an ASCII string. The result is stored in the string text with an offset of offset. The
offset parameter is used to change a string after a specified number (offset) of characters and leave the
beginning of the string intact. If the resulting string is smaller than minwidth the beginning of the string
gets filled with zeros "0".
The base of the numbering system can be given in the base parameter. If you set base to 2, you will get a
string with binary digits. A base of 8 produces an octal string, and a base of 16 a hexadecimal string. If the
base is set to a number greater than 16, more characters of the alphabet are used. E.g. a base of 18 pro-
duces a string with the digits '0'-'9' and 'A'-'H'.
Parameter
n 16 bit word
base base of the number system
text pointer to destination string
offset offset that is applied to the position where the string is copied
minwidth minimal width of the string
If offset has the value STR_APPEND (ffff Hex) then the length of the destination string is assumed as
offset. In this case the source string is copied behind the destination string.