Go to the source code of this file.
#define DUMP_BUF_SIZE 128 |
#define DUMP_BUF_SIZE 128 |
#define DUMP_BUF_SIZE 128 |
- Parameters
-
Deletes integer or float atom by returning it back to the data pool.
Definition at line 83 of file numbers.c.
atom_t new_integer |
( |
int64_t |
data) | |
|
- Parameters
-
- Returns
- integer atom
Creates an integer atom with reference count 1.
Definition at line 99 of file numbers.c.
108 printf(
"<ATOM> [%08x] integer=%I64d\n",(
int)a,data);
118 #ifdef DEBUG_RUNTIME_ATOMS
122 dump_atom_address( a );
127 #ifdef DEBUG_COMPILETIME_ATOMS
131 dump_atom_address( a );
- Parameters
-
data | 64-bit floating-point |
- Returns
- float atom
Creates an floating-point atom with reference count 1.
Definition at line 152 of file numbers.c.
166 printf(
"<ATOM> [%08x] float=%Lf\n",(
int)a,data);
176 #ifdef DEBUG_RUNTIME_ATOMS
180 dump_atom_address( a );
185 #ifdef DEBUG_COMPILETIME_ATOMS
189 dump_atom_address( a );
- Parameters
-
a | atom to dump |
level | dump level |
Dumps integer atom through the current outter function.
Definition at line 209 of file numbers.c.
224 #define DUMP_BUF_SIZE 128
232 if( 0<=limit && limit<10 ) limit=10;
234 if( 0<=limit && limit<n )
void dump_integer_const |
( |
int |
a) | |
|
- Parameters
-
Dumps integer constant through the current outter function.
Definition at line 260 of file numbers.c.
262 #define DUMP_BUF_SIZE 128
- Parameters
-
a | atom to dump |
level | dump level |
Dumps float atom through the current outter function.
Definition at line 311 of file numbers.c.
334 if( isnan(
FLOAT(a))!=0 )
341 #define DUMP_BUF_SIZE 128
345 if( x==0 && signbit(x) ) x = 0;
348 if( (x>=1e23) || (x<=-1e23) || ((x>=-1e-23) && (x<=1e-23)) )
355 while( buf[n-1]==L
'0' ) n--;
356 if( buf[n-1]==L
'.' ) n--;
357 if( (
unsigned char)buf[n-1]<128
364 if( 0<=limit && limit<10 ) limit=10;
366 if( 0<=limit && limit<n )
- Parameters
-
a | atom to convert |
np | pointer where to put the number |
- Returns
- returns 1 if conversion was successful.
Converts an atom to a floating point number. If conversion is possible, then *np will contain the number and the return value will be 1. Otherwise *np will be uninitialized and the return value will be 0.
Definition at line 398 of file numbers.c.
431 *(ptr+cnt) =
TEXT(
'\0');
433 if( (*ptr==
TEXT(
'0')) && ((*(ptr+1)==
TEXT(
'x')) || (*(ptr+1)==
TEXT(
'X'))))
444 if( end-ptr==cnt )
return 1;
int atom_to_int |
( |
atom_t |
a, |
|
|
int64_t * |
np |
|
) |
| |
- Parameters
-
a | atom to convert |
np | pointer where to put the number |
- Returns
- returns 1 if conversion was successful.
Converts an atom to a 64-bit integer number. If conversion is possible, then *np will contain the number and the return value will be 1. Otherwise *np is uninitialized and the return value will be set to 0.
Definition at line 488 of file numbers.c.
521 *(ptr+cnt) =
TEXT(
'\0');
526 if( end-ptr==cnt )
return 1;
int atom_to_integer |
( |
atom_t |
a, |
|
|
int * |
np |
|
) |
| |
- Parameters
-
a | atom to convert |
np | pointer where to put the number |
- Returns
- returns 1 if conversion was successful.
Converts an atom to a 32-bit integer number. If conversion is possible, then *np will contain the number and the return value will be 1. Otherwise *np will be set to -1 and the return value will be set to 0.
Definition at line 546 of file numbers.c.
581 *(ptr+cnt) =
TEXT(
'\0');
586 if( end-ptr==cnt )
return 1;