functionquoted
character(len=len(text)+2) function quoted(text) result(out)
text in quotes, as one argument of a command.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| text | character(len=*) | in | the text |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| out | character(len=len(text)+2) | private |
Calls
Source
Show the code
function quoted(text) result(out)
character(len=*), intent(in) :: text !! the text
character(len=len(text) + 2) :: out
if (is_windows()) then
out = '"'//text//'"'
else
out = "'"//text//"'"
end if
end function quoted