to_string_width Interface

public interface to_string_width

Render an integer right aligned in a field of the requested width. Right aligned integer rendering, blank padded on the left.

The value is never truncated and never replaced by asterisks: if it does not fit in width characters the field is widened and the full number is returned, so the result length is max(width, needed). A width of zero or less simply returns the unpadded number.

Calls

interface~~to_string_width~~CallsGraph interface~to_string_width to_string_width proc~to_string_width_i32 to_string_width_i32 interface~to_string_width->proc~to_string_width_i32 proc~to_string_width_i64 to_string_width_i64 interface~to_string_width->proc~to_string_width_i64 interface~to_string to_string proc~to_string_width_i32->interface~to_string proc~pad_left pad_left proc~to_string_width_i32->proc~pad_left proc~to_string_width_i64->interface~to_string proc~to_string_width_i64->proc~pad_left

Module Procedures

private pure function to_string_width_i32(value, width) result(string)

Right aligned rendering of an integer(int32) value.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: value
integer(kind=default_int), intent(in) :: width

Return Value character(len=:), allocatable

private pure function to_string_width_i64(value, width) result(string)

Right aligned rendering of an integer(int64) value.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: value
integer(kind=default_int), intent(in) :: width

Return Value character(len=:), allocatable