PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
TextDevices
libsimpletext
writeFloat.c
1
/*
2
* @file writeFloat.c
3
* Function to print a float number to the pointer.
4
*
5
* Copyright (c) 2013, Parallax Inc.
6
* Written by Steve Denson
7
*/
8
#include "
simpletext.h
"
9
10
void
writeFloat
(
text_t
*p,
float
number)
11
{
12
char
str[20];
13
char
*fs = float2string(number, str, 1, 10);
14
writeStr
(p, fs);
15
}
16
17
/*
18
+--------------------------------------------------------------------
19
| TERMS OF USE: MIT License
20
+--------------------------------------------------------------------
21
Permission is hereby granted, free of charge, to any person obtaining
22
a copy of this software and associated documentation files
23
(the "Software"), to deal in the Software without restriction,
24
including without limitation the rights to use, copy, modify, merge,
25
publish, distribute, sublicense, and/or sell copies of the Software,
26
and to permit persons to whom the Software is furnished to do so,
27
subject to the following conditions:
28
29
The above copyright notice and this permission notice shall be
30
included in all copies or substantial portions of the Software.
31
32
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
34
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
35
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
36
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
37
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
38
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39
+--------------------------------------------------------------------
40
*/
41
writeFloat
void writeFloat(text_t *device, float value)
Print string representation of a 32 bit floating point number to device.
Definition:
writeFloat.c:10
simpletext.h
This library provides a collection of functions for communicating with text devices such as SimpleIDE...
text_struct
Structure that contains data used by simple text device libraries.
Definition:
simpletext.h:81
writeStr
int writeStr(text_t *device, char *str)
Send a string to the device.
Definition:
writeStr.c:10
Generated on Fri May 20 2022 16:48:05 for PropWare by
1.8.17