Functions
Public Variable Access Functions

In an Embryo program, a global variable can be declared public, as described in Scope. More...

Functions

EAPI Embryo_Cell embryo_program_variable_find (Embryo_Program *ep, const char *name)
 Retrieves the location of the public variable in the given program with the given name. More...
 
EAPI int embryo_program_variable_count_get (Embryo_Program *ep)
 Retrieves the number of public variables in the given program. More...
 
EAPI Embryo_Cell embryo_program_variable_get (Embryo_Program *ep, int num)
 Retrieves the location of the public variable in the given program with the given identifier. More...
 

Detailed Description

In an Embryo program, a global variable can be declared public, as described in Scope.

The functions here allow the host program to access these public variables.

Function Documentation

◆ embryo_program_variable_find()

EAPI Embryo_Cell embryo_program_variable_find ( Embryo_Program *  ep,
const char *  name 
)

Retrieves the location of the public variable in the given program with the given name.

Parameters
epThe given program.
nameThe given name.
Returns
The address of the variable if found. EMBRYO_CELL_NONE otherwise.

References EMBRYO_CELL_NONE.

◆ embryo_program_variable_count_get()

EAPI int embryo_program_variable_count_get ( Embryo_Program *  ep)

Retrieves the number of public variables in the given program.

Parameters
epThe given program.
Returns
The number of public variables.

◆ embryo_program_variable_get()

EAPI Embryo_Cell embryo_program_variable_get ( Embryo_Program *  ep,
int  num 
)

Retrieves the location of the public variable in the given program with the given identifier.

Parameters
epThe given program.
numThe identifier of the public variable.
Returns
The virtual machine address of the variable if found. EMBRYO_CELL_NONE otherwise.

References EMBRYO_CELL_NONE.