Multi-line string

Good day,
How can Multi-line text be entered?

strStyleError: string='
< style type="text/css">
body {
font-famliy: "Segoe UI", sans-serif;
background-color: red;
color: white;
< style>

The left bracket '<' by 'style' seems to be causing at Compile problem.

Where do you want to enter this? In code?
If so, you should do this like it is normally done in Delphi code
It is also discussed here:

An example is to save a string constant on multiple lines, which I realize works. However, as example above illustrates the '<' in '' causes an issue at Compile-time and I need to know how to have it accepted in such circumstances.

I cannot get this working, even in Delphi unrelated to TMS WEB Core. I cannot get this working without < and > characters.
Afaik, this isn't supported in Object Pascal.

Ok. Thanks.

It would be very useful if it is added to Pas2JS as it would assist greatly with long strings.

For example, within a program one can use it to easily include some CSS styles / HTML layout and just add the string.


We will pass this request to the pas2js compiler team.

Multi Line String Support has been a requested feature since Delphi 1 IIRC.

It would make code so much cleaner.

Fully agreed. Both the Delphi compiler and pas2js compiler would greatly benefit from this.

1 Like