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

Ben Grasset operator97 at gmail.com
Sat Jul 6 16:56:49 CEST 2019


On Sat, Jul 6, 2019 at 10:52 AM Ryan Joseph <genericptr at gmail.com> wrote:

> {$mode objfpc}
>
> program test;
>
> const 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;
>       }
>     }
>
>     // TODO: testing
>     fragColor = vec4(1,0,0,1);
>   }
> `;
>
> var
>   s: ansistring;
> begin
>   writeln(b);
> end.
>
> Regards,
>         Ryan Joseph
>

Yep. I was actually just writing a couple of tests that directly look at
how errors are handled, so this might prove as a good case for one of them
once I get it remedied.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190706/1d1fa868/attachment.html>


More information about the fpc-devel mailing list