aot_file_to_buffer Subroutine

public subroutine aot_file_to_buffer(filename, buffer, ErrCode, ErrString)

Subroutine to load a script from a file and put it into a character buffer.

This is useful to rerun a given code in a file without the need to touch the file itself again.

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: filename

Name of file to load the Lua code from

type(cbuf_type), intent(out) :: buffer

Buffer to store the script in the given file in

integer, intent(out), optional :: ErrCode

Error code returned by Lua during loading or executing the file.

This optional parameter might be used to react on errors in the calling side. If neither ErrCode nor ErrString are given, this subroutine will stop the program execution and print the error message from Lua to the stdout.

character(len=*), intent(out), optional :: ErrString

Obtained error description from the Lua stack.

This optional argument holds the Lua error message in case somehting went wrong. It can be used to provide some feedback to the user in the calling routine. If neither ErrCode nor ErrString are provided, open_config() will print the error message and stop program execution.


Calls

proc~~aot_file_to_buffer~~CallsGraph proc~aot_file_to_buffer aot_file_to_buffer proc~close_config close_config proc~aot_file_to_buffer->proc~close_config proc~aot_err_handler aot_err_handler proc~aot_file_to_buffer->proc~aot_err_handler interface~flu_dump flu_dump proc~aot_file_to_buffer->interface~flu_dump flul_newstate flul_newstate proc~aot_file_to_buffer->flul_newstate flul_loadfile flul_loadfile proc~aot_file_to_buffer->flul_loadfile proc~flu_close flu_close proc~close_config->proc~flu_close proc~flu_tolstring flu_tolstring proc~aot_err_handler->proc~flu_tolstring proc~flu_dump_tobuf flu_dump_toBuf interface~flu_dump->proc~flu_dump_tobuf interface~lua_close lua_close proc~flu_close->interface~lua_close dump_lua_tobuf dump_lua_tobuf proc~flu_dump_tobuf->dump_lua_tobuf interface~lua_tolstring lua_tolstring proc~flu_tolstring->interface~lua_tolstring

Contents


Variables

TypeVisibilityAttributesNameInitial
type(flu_State), private :: L
integer, private :: err
integer, private :: buflen