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

Sven Barth pascaldragon at googlemail.com
Fri Jul 5 22:20:16 CEST 2019


Am 05.07.2019 um 19:41 schrieb Ryan Joseph:
>
>> On Jul 5, 2019, at 1:36 PM, Ben Grasset <operator97 at gmail.com> wrote:
>>
>> {$push}
>> {$H+}
>> var Ansi: String;
>> {$pop}
> This doesn’t work either.
>
> {$push}
> {$h+}
> var lines: ansistring = `
>    #version 150
>
>    uniform sampler2D textures[8];
>    in vec2 vertexTexCoord;
>    in vec4 vertexColor;
>    in float vertexUVMap;
>    out vec4 fragColor;
>
>    void main()
>    {
>      if (vertexUVMap == 255) {
>        fragColor = vertexColor;
>      } else {
>        fragColor = texture(textures[int(vertexUVMap)], vertexTexCoord.st);
>        if (vertexColor.a < fragColor.a) {
>          fragColor.a = vertexColor.a;
>        }
>      }
>    }`;
> {$pop}
Works here if you use a good, old single line string. So it's probably 
some problem with the multiline string.

Regards,
Sven


More information about the fpc-devel mailing list