Collection of general operations required for the output of Lua scripts.
This type provides the internal representation of the opened Lua script.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | outunit |
Unit to write to |
|||
integer, | public | :: | indent |
Indentation level (number of spaces) |
|||
integer, | public | :: | stack(100) |
Number of entries on each level |
|||
integer, | public | :: | level |
Current nesting level in tables |
|||
logical, | public | :: | externalOpen |
Flag if file opened outside the aot_out scope |
|||
integer, | public | :: | in_step |
Number of spaces for each indentation level |
Helper function to provide new unit, as long as F2008 newunit argument in open statement is not commonly available.
Open the file to write to and return a handle (put_conf) to it.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Close the opened script again.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(aot_out_type), | intent(inout) | :: | put_conf |
Start a new table to write to.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(aot_out_type), | intent(inout) | :: | put_conf | |||
character(len=*), | intent(in), | optional | :: | tname | ||
logical, | intent(in), | optional | :: | advance_previous |
Close the current table.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(aot_out_type), | intent(inout) | :: | put_conf | |||
logical, | intent(in), | optional | :: | advance_previous |
This subroutine takes care of the proper linebreaking in Lua-Tables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(aot_out_type), | intent(inout) | :: | put_conf | |||
logical, | intent(in), | optional | :: | advance_previous |
This subroutine converts information written in outunit to string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
|
character(len=*), | intent(out), | optional | :: | ErrString |
Error description |