设置终端输出
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(out) | :: | self |
进度条
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg | |||
| real, | intent(in) | :: | p |
信息
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
警告
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
错误
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
成功
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
红色
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
黄色
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
绿色
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
蓝色
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(terminal), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | msg |
type terminal
logical, private :: use_color = .false.
contains
procedure :: setup => set_terminal
procedure :: progress_bar => terminal_progress_bar
procedure :: info => terminal_info
procedure :: warning => terminal_warning
procedure :: error => terminal_error
procedure :: success => terminal_success
procedure :: blue, green, yellow, red
end type terminal