aot_out_general_module Module

Collection of general operations required for the output of Lua scripts.


Used by

  • module~~aot_out_general_module~~UsedByGraph module~aot_out_general_module aot_out_general_module module~aot_extdouble_out_module aot_extdouble_out_module module~aot_extdouble_out_module->module~aot_out_general_module module~aot_out_module aot_out_module module~aot_out_module->module~aot_out_general_module module~aot_out_module->module~aot_extdouble_out_module module~aot_quadruple_out_module aot_quadruple_out_module module~aot_out_module->module~aot_quadruple_out_module module~aot_quadruple_out_module->module~aot_out_general_module

Contents


Derived Types

type, public :: aot_out_type

This type provides the internal representation of the opened Lua script.

Read more…

Components

TypeVisibilityAttributesNameInitial
integer, private :: outunit

Unit to write to

integer, private :: indent

Indentation level (number of spaces)

integer, private :: stack(100)

Number of entries on each level

integer, private :: level

Current nesting level in tables

logical, private :: externalOpen

Flag if file opened outside the aot_out scope

integer, private :: in_step

Number of spaces for each indentation level


Functions

private function newunit() result(nu)

Helper function to provide new unit, as long as F2008 newunit argument in open statement is not commonly available.

Read more…

Arguments

None

Return Value integer


Subroutines

public subroutine aot_out_open(put_conf, filename, outUnit, indentation, outstat)

Open the file to write to and return a handle (put_conf) to it.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(aot_out_type), intent(out) :: put_conf

Handle for the file

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

File to open

integer, intent(in), optional :: outUnit

Pre-connected unit to write to

integer, intent(in), optional :: indentation

Spacer per indentation level

integer, intent(out), optional :: outstat

IO status of the open operation for the given filename or an indication whether the given outUnit is actually connected to an open file.

This returns 0 if the the returned unit has properly been properly connected to the file.

public subroutine aot_out_close(put_conf)

Close the opened script again.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(aot_out_type), intent(inout) :: put_conf

public subroutine aot_out_open_table(put_conf, tname, advance_previous)

Start a new table to write to.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(aot_out_type), intent(inout) :: put_conf
character(len=*), intent(in), optional :: tname
logical, intent(in), optional :: advance_previous

public subroutine aot_out_close_table(put_conf, advance_previous)

Close the current table.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(aot_out_type), intent(inout) :: put_conf
logical, intent(in), optional :: advance_previous

public subroutine aot_out_breakline(put_conf, advance_previous)

This subroutine takes care of the proper linebreaking in Lua-Tables.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(aot_out_type), intent(inout) :: put_conf
logical, intent(in), optional :: advance_previous

public subroutine aot_out_toChunk(out_conf, chunk, ErrCode, ErrString)

This subroutine converts information written in outunit to string

Arguments

TypeIntentOptionalAttributesName
type(aot_out_type), intent(in) :: out_conf
character(len=*), intent(out) :: chunk

String with Lua code to load.

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

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

Error description

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