[fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

Zoe Peterson zoe at scootersoftware.com
Fri Jul 5 01:44:42 CEST 2019


> From: Sven Barth via fpc-devel <fpc-devel at lists.freepascal.org>
> Whitespace is indeed an important point. I myself pay quite some 
> attention to nice identation and with multiline strings that will 
> probably break:

What about matching Python's whitespace handling for multiline 
docstrings?

https://www.python.org/dev/peps/pep-0257/#handling-docstring-
indentation

"Docstring processing tools will strip a uniform amount of indentation 
from the second and further lines of the docstring, equal to the 
minimum indentation of all non-blank lines after the first line. Any 
indentation in the first line of the docstring (i.e., up to the first newline) 
is insignificant and removed. Relative indentation of later lines in the 
docstring is retained. Blank lines should be removed from the beginning 
and end of the docstring."

Bash heredoc syntax has a similar idea where you can use <<- instead 
of << to start it to indicate that leading tabs should be ignored.

-- 
Zoƫ Peterson
Scooter Software




More information about the fpc-devel mailing list