Call Internal C Code

DESCRIPTION:

Interfaces to the built-in C code for S-PLUS.

USAGE:

.Internal(call, entry, evaluate=T, code=0) 

REQUIRED ARGUMENTS:

call
expression for the function call corresponding to the internal code. The C routine gets both the unevaluated and (optionally) the evaluated version of the argument list in the call expression.
entry
character string name for the C routine being called.

OPTIONAL ARGUMENTS:

evaluate
if TRUE, the argument expressions are evaluated before calling the C routine.
code
numeric code (one number) used to combine several functions into one internal C routine.

VALUE:

The value computed and returned by the specialized C routine.

DETAILS:

This is the interface to the built-in C code in the S-PLUS executive; that is, to the C routines that understand how S-PLUS objects are stored internally and how to create and modify such objects. It is not intended that users should write such code or use.Internaldirectly.

Some of the functions that have call .Internal are generic, see specific functions to determine which are generic. See Methods for more details about generic functions.

R's .Internal function:

R's version of .Internal does not include the name of the C function to call as the entry, or second, argument. Instead the function name is stored in a table. So when parsing R code containing calls to .Internal an error will be generated. But if parsing in "R" mode, a warning is generated so that parsing will continue instead of stopping when a call to .Internal is found. When porting R code, the call to .Internal must be modified adding the name of the C function as the second argument.

     > pmode <- set.parse.mode("R")
     > func <- function(x) .Internal(func(x))
     Warning messages:
       Second argument (the name of the C routine) missing in .Internal for
             func(x).  Splus, unlike R, requires it
     > func
     function(x)
     .Internal(func(x), "Unspecified .Internal entry point")

SEE ALSO:

, , , .