Topic : C Library Functions

Forum : ST7/STM8

Original Post
Post Information Post
June 11, 2011 - 7:41pm
Guest

Have been searching raisonance.com for full help on the all standard C Library functions of Raisonance C Compiler.
None is found..
Where is the link ???

Need full description on atol, ceil, fabs, floor, getchar, gets, isalnum, isalpha, islower, log, memchr, memcmp, memcpy, printf, putchar, puts, rand, sprintf, srand, strcat, strchr, strcmp, strcpy, strlen, strspn, strstr, etc.....

Compiler such as Cosmic provides such description at:

a) C Language of Cosmic
http://www.cosmic-software.com/downloads/docs/clanguage.zip

b) C Library Function of Cosmic
http://www.cosmic-software.com/downloads/docs/cxst7.zip

Replies
Post Information Post
+1
0
-1
June 11, 2011 - 7:51pm
Guest

Standard Peripheral Library of STM8S is available at:
http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm8_stdperiph_lib.zip

in the help file stm8s-a_stdperiph_lib_um.chm

======================================================

What is missing now is how to use atol, ceil, fabs, floor, getchar, gets, isalnum, isalpha, islower, log, memchr, memcmp, memcpy, printf, putchar, puts, rand, sprintf, srand, strcat, strchr, strcmp, strcpy, strlen, strspn, strstr, etc.....

properly in Raisonance C Compiler..

+1
0
-1
June 11, 2011 - 8:38pm
Guest

Here is description of the printf function in Cosmic:

======================================================
printf

Description
Output formatted arguments to stdout

Syntax
#include
int printf(@near char *fmt, ...)

Function
printf writes formatted output to the output stream using the format
string at fmt and the arguments specified by ..., as described below.

printf uses putchar to output each character.

Format Specifiers
The format string at fmt consists of literal text to be output, interspersed
with conversion specifications that determine how the arguments are to
be interpreted and how they are to be converted for output. If there are
insufficient arguments for the format, the results are undefined. If the
format is exhausted while arguments remain, the excess arguments are
evaluated but otherwise ignored. printf returns when the end of the format
string is encountered.

.
.
.
.
.
.
.
.
.
.

Return Value
printf returns the number of characters transmitted, or a negative
number if a write error occurs.

Notes
A call with more conversion specifiers than argument variables will
cause unpredictable results.

Example
To print arg, which is a double with the value 5100.53:
printf(ā€œ%8.2f\nā€, arg);
printf(ā€œ%*.*f\nā€, 8, 2, arg);

both forms will output: 05100.53

Notes
If printf encounters an invalid conversion specifier, the invalid specifier
is ignored and no special message is generated.

See Also
sprintf

======================================================

Is there any such description in Raisonance help file ??

+1
0
-1
June 14, 2011 - 9:25am
Raisonance Support Team

Hi,

Thanks for your inteest in Raisonance products.
You can find information on the C library in the C compiler manual, available with your RKit.
This kind of information is not available online.

We basically support all freestanding C library functions, except the file manipulation and system functions (atexit, system)

Best Regards,