Str_Writeint; Str_Writeword - Conrad C-Control Pro Mega Series Manual

Table of Contents

Advertisement

6.17.9 Str_WriteInt

String Functions
Syntax
void Str_WriteInt(int n, char text[], word offset);
Sub Str_WriteInt(n As Integer,ByRef text As Char,offset As Word)
Description
The integer number n is converted to a signed 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.
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 (0xffff) then the length of the destination string is assumed as
offset. In this case the source string is copied behind the destination string.

6.17.10 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
produces a string with the digits '0'-'9' and 'A'-'H'.
Parameter
© 2008 Conrad Electronic
Libraries
188

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the C-Control Pro Mega Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

C-control pro mega32C-control pro mega128

Table of Contents