Stop and print#191
Open
rouson wants to merge 18 commits into
Open
Conversation
This commit adds a pure stop_and_print subroutine and a corresponding unit test. The new subroutine facilitates printing string_t objects, including the results of string_t expressions, during error termination. Example Usage: call stop_and_print( "array = " // string_t( [1,2,3,4] ) )
This commit works around several build-time and runtime gfortran conpiler bugs.
The character_stop_code subroutine is public only for purposes of calling it from thetest suite so there's no need to have it in the public interface (julienne_m).
This commit supports using user-defined derived-type output (UDDTO) to create stop codes for derived types that extend the new writable_t abstract type, which has - A write_formatted deferred binding that obligates child types to support UDDTO, - A private maxlen_ component that sets the maximum stop-code length, - A maxlen type-bound function that returns maxlen_, and - A set_maxlen type-bound subroutine that sets maxlen_. This commit also includes a corresponding unit test.
bonachea
requested changes
Jun 29, 2026
| if (.not. command_line%argument_present([character(len=len("--help"))::"--help","-h"])) then | ||
| #if TEST_INTENTIONAL_FAILURE && ASSERTIONS | ||
| if (me==1) print '(a)', new_line('') // 'Test the intentional failure of stop_and_print in a pure procedure: ' // new_line('') | ||
| if (me==1) print '(a)', new_line('') // 'Test the intentional failure of an idiomatic assertion: ' // new_line('') |
Member
There was a problem hiding this comment.
Suggested change
| if (me==1) print '(a)', new_line('') // 'Test the intentional failure of an idiomatic assertion: ' // new_line('') | |
| if (me==1) print '(a)', new_line('') // 'Test the intentional failure of an idiomatic stop_and_print: ' // new_line('') |
Member
There was a problem hiding this comment.
Julienne library code should never call error stop directly.
Every new error stop in this file should be replaced with internal_error_stop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.