to_int

skylib_fluffos_v3/mudlib/doc/driver/efuns/floats/to_int · 677 B

From the archive skylib_fluffos_v3.zip

Download the archive   « Back to the archive contents

.DT
to_int
$MUDNAME$ driver help
to_int
 
.SH Name
.SI 5
to_int - convert a float, buffer or string to an int
.EI

.SH Synopsis
.SI 5
int to_int( float x );
int to_int( buffer x );
int to_int( string x );
.EI

.SH Description
.SP 5 5
If 'x' is a float, the to_int() call returns the number of type 'int' that is
equivalent to 'x' (with any decimal stripped off).  If 'x' is a buffer, the
call returns the integer (in network-byte-order) that is embedded in the
buffer.  If 'x' is a string, then the string is converted to an integer.
An undefined value is returned if the string is not a valid number.
.EP

.SH See also
.SI 5
to_float(), read_buffer(), sprintf(), sscanf()
.EI

Site Stats

Snippets: 1791
Codebases: 571