Public Methods
 FunctionDefined By
  
AVM-only abort():void
Generate an abnormal process abort.
C.stdlib
  
AVM-only abs(i:int):int
Return an integer absolute value.
C.stdlib
  
Register a function to run at process termination.
C.stdlib
  
Convert a string to a double-precision number.
C.stdlib
  
AVM-only atoi(str:String):int
Convert a string to an integer.
C.stdlib
  
Convert a string to a long integer.
C.stdlib
  
Convert a string to a long integer.
C.stdlib
  
AVM-only div(numer:int, denom:int):div_t
Compute the quotient and remainder of an integer division.
C.stdlib
  
AVM-only exit(status:int = -1):void
Terminate program execution.
C.stdlib
  
Get value of an environment variable.
C.stdlib
  
Return a long integer absolute value.
C.stdlib
  
AVM-only ldiv(numer:Number, denom:Number):ldiv_t
Compute the quotient and remainder of a number division.
C.stdlib
  
Return a long integer absolute value.
C.stdlib
  
AVM-only lldiv(numer:Number, denom:Number):lldiv_t
Compute the quotient and remainder of a number division.
C.stdlib
  
Get number of bytes in a character.
C.stdlib
  
AVM-only mkdtemp(template:String):String
Create a unique directory.
C.stdlib
  
AVM-only mkstemp(template:String):int
Create a unique file.
C.stdlib
  
AVM-only putenv(name:String):int
Change or add a value to an environment.
C.stdlib
  
AVM-only rand():int
Pseudo-random number generator.
C.stdlib
  
Resolve a pathname.
C.stdlib
  
AVM-only setenv(name:String, value:String, overwrite:Boolean = false):int
Add or change an environment variable.
C.stdlib
  
AVM-only srand(seed:uint):void
Pseudo-random number generator.
C.stdlib
  
Convert a string to a double-precision number.
C.stdlib
  
Convert a string to a double-precision number.
C.stdlib
  
AVM-only strtol(str:String, base:uint = 0):int
Convert a string to a long integer.
C.stdlib
  
Convert a string to a double-precision number.
C.stdlib
  
AVM-only strtoll(str:String, base:uint = 0):int
Convert a string to a long integer.
C.stdlib
  
AVM-only strtoul(str:String, base:uint = 0):uint
Convert a string to an unsigned long.
C.stdlib
  
AVM-only strtoull(str:String, base:uint = 0):uint
Convert a string to an unsigned long.
C.stdlib
  
AVM-only system(command:String):int
Issue a command.
C.stdlib
  
Remove an environment variable.
C.stdlib


Public Constants
 ConstantDefined By
  AVM-only EXIT_FAILURE : int
Failure termination code.
C.stdlib
  AVM-only EXIT_SUCCESS : int
Success termination code.
C.stdlib
  AVM-only MB_CUR_MAX : int
Maximum number of bytes in a character specified by the current locale (category LC_CTYPE).
C.stdlib
  AVM-only RAND_MAX : int
Maximum value returned by rand(); at least 32767.
C.stdlib
Constant Detail
AVM-only EXIT_FAILUREConstant
public const EXIT_FAILURE:int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Failure termination code. Unsuccessful termination for exit(); evaluates to a non-zero value.

AVM-only EXIT_SUCCESSConstant 
public const EXIT_SUCCESS:int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Success termination code. Successful termination for exit(); evaluates to 0.

AVM-only MB_CUR_MAXConstant 
public const MB_CUR_MAX:int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Maximum number of bytes in a character specified by the current locale (category LC_CTYPE).

AVM-only RAND_MAXConstant 
public const RAND_MAX:int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Maximum value returned by rand(); at least 32767.

Function detail
AVM-only abort()function
public function abort():void

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Generate an abnormal process abort.

The abort() function shall cause abnormal process termination to occur, unless the signal SIGABRT is being caught and the signal handler does not return.

AVM-only abs()function 
public function abs(i:int):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Return an integer absolute value.

Parameters

i:int

Returns
int
AVM-only atexit()function 
public function atexit(f:Function):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Register a function to run at process termination.

The atexit() function shall register the function pointed to by f, to be called without arguments at normal program termination.

At normal program termination, all functions registered by the atexit() function shall be called, in the reverse order of their registration, except that a function is called after any previously registered functions that had already been called at the time it was registered. Normal termination occurs either by a call to exit() or a return from main().

At least 32 functions can be registered with atexit().

After a successful call to any of the exec functions, any functions previously registered by atexit() shall no longer be registered.

Parameters

f:Function — The pointer to a Function.

Returns
int — Upon successful completion, atexit() shall return 0; otherwise, it shall return a non-zero value.

See also


Example
Usage
     import C.stdlib.*;
     
     atexit( function() { trace( "anonymous function" ); } );
     
     var test1:Function = function():void
     {
         trace( "test1 function" );
     }
     atexit( test1 );
     
     exit();
     
     //output
     "test1 function"
     "anonymous function"
     
AVM-only atof()function 
public function atof(str:String):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a double-precision number.

Parameters

str:String — The string to convert.

Returns
Number — The atof() function shall return the converted value if the value can be represented.

Example
Usage
     import C.stdlib.*;
     import C.math.*;
     
     var pi:Number = 3.1415926535;
     var result:Number = atof( "45.0000000001" );
     
     trace( "result = " + result );
     trace( "sine = " + sin(result * pi / 180) );
     
     
AVM-only atoi()function 
public function atoi(str:String):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to an integer.

Parameters

str:String — The string to convert.

Returns
int — The atoi() function shall return the converted value if the value can be represented.

Example
Usage
     import C.stdlib.*;
     
     var result:int = atoi( "73" );
     
     trace( "result = " + result );
     trace( "result x 2 = " + (result * 2) );
     
     
AVM-only atol()function 
public function atol(str:String):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a long integer.

Parameters

str:String — The string to convert.

Returns
Number — The atol() function shall return the converted value if the value can be represented.

Example
Usage
     import C.stdlib.*;
     
     var result:Number = atol( "567283" );
     
     trace( "result = " + result );
     trace( "result x 2 = " + (result * 2) );
     
     
AVM-only atoll()function 
public function atoll(str:String):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a long integer.

Parameters

str:String

Returns
Number
AVM-only div()function 
public function div(numer:int, denom:int):div_t

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Compute the quotient and remainder of an integer division.

Parameters

numer:int
 
denom:int

Returns
div_t
AVM-only exit()function 
public function exit(status:int = -1):void

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Terminate program execution.

Parameters

status:int (default = -1)

AVM-only getenv()function 
public function getenv(name:String):String

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Get value of an environment variable.

Parameters

name:String

Returns
String
AVM-only labs()function 
public function labs(i:Number):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Return a long integer absolute value.

Parameters

i:Number

Returns
Number
AVM-only ldiv()function 
public function ldiv(numer:Number, denom:Number):ldiv_t

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Compute the quotient and remainder of a number division.

Parameters

numer:Number
 
denom:Number

Returns
ldiv_t
AVM-only llabs()function 
public function llabs(i:Number):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Return a long integer absolute value.

Parameters

i:Number

Returns
Number
AVM-only lldiv()function 
public function lldiv(numer:Number, denom:Number):lldiv_t

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Compute the quotient and remainder of a number division.

Parameters

numer:Number
 
denom:Number

Returns
lldiv_t
AVM-only mblen()function 
public function mblen(s:String, n:int):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Get number of bytes in a character.

Parameters

s:String
 
n:int

Returns
int
AVM-only mkdtemp()function 
public function mkdtemp(template:String):String

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Create a unique directory.

Parameters

template:String

Returns
String
AVM-only mkstemp()function 
public function mkstemp(template:String):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Create a unique file.

Parameters

template:String

Returns
int
AVM-only putenv()function 
public function putenv(name:String):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Change or add a value to an environment.

Parameters

name:String

Returns
int
AVM-only rand()function 
public function rand():int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Pseudo-random number generator.

Returns
int
AVM-only realpath()function 
public function realpath(path:String):String

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Resolve a pathname.

Parameters

path:String

Returns
String
AVM-only setenv()function 
public function setenv(name:String, value:String, overwrite:Boolean = false):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Add or change an environment variable.

Parameters

name:String
 
value:String
 
overwrite:Boolean (default = false)

Returns
int
AVM-only srand()function 
public function srand(seed:uint):void

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Pseudo-random number generator.

Parameters

seed:uint

AVM-only strtod()function 
public function strtod(str:String):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a double-precision number.

Parameters

str:String

Returns
Number
AVM-only strtof()function 
public function strtof(str:String):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a double-precision number.

Parameters

str:String

Returns
Number
AVM-only strtol()function 
public function strtol(str:String, base:uint = 0):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a long integer.

Parameters

str:String
 
base:uint (default = 0)

Returns
int
AVM-only strtold()function 
public function strtold(str:String):Number

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a double-precision number.

Parameters

str:String

Returns
Number
AVM-only strtoll()function 
public function strtoll(str:String, base:uint = 0):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to a long integer.

Parameters

str:String
 
base:uint (default = 0)

Returns
int
AVM-only strtoul()function 
public function strtoul(str:String, base:uint = 0):uint

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to an unsigned long.

Parameters

str:String
 
base:uint (default = 0)

Returns
uint
AVM-only strtoull()function 
public function strtoull(str:String, base:uint = 0):uint

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Convert a string to an unsigned long.

Parameters

str:String
 
base:uint (default = 0)

Returns
uint
AVM-only system()function 
public function system(command:String):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Issue a command.

Parameters

command:String

Returns
int
AVM-only unsetenv()function 
public function unsetenv(name:String):int

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Remove an environment variable.

Parameters

name:String

Returns
int