FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
file_input_ulongint.c
Go to the documentation of this file.
1
/* input function for signed long long's */
2
3
#include "
fb.h
"
4
#include <math.h>
5
6
FBCALL
int
fb_InputUlongint
(
unsigned
long
long
*dst )
7
{
8
char
buffer
[
FB_INPUT_MAXNUMERICLEN
+1];
9
ssize_t len;
10
int
isfp;
11
12
len =
fb_FileInputNextToken
( buffer,
FB_INPUT_MAXNUMERICLEN
,
FB_FALSE
, &isfp );
13
14
if
( isfp ==
FALSE
)
15
{
16
if
( len <=
FB_INPUT_MAXINTLEN
)
17
*dst = (
unsigned
long
long)(
long
long
)
fb_hStr2Int
( buffer, len );
18
else
19
*dst =
fb_hStr2ULongint
( buffer, len );
20
}
21
else
22
*dst = (
unsigned
long
long)rint(
fb_hStr2Double
( buffer, len ) );
23
24
return
fb_ErrorSetNum
(
FB_RTERROR_OK
);
25
}
rtlib
file_input_ulongint.c
Generated on Thu Jan 23 2014 19:40:11 for FreeBASIC by
1.8.4