> On Jul 5, 2019, at 7:33 PM, Ben Grasset <operato...@gmail.com> wrote:
> 
> {$H+} is definitely not needed for an explicit 'var string: ansistring'. It 
> works even with {$H-}.

Do you mean this? I still get an error without H+.

{$mode objfpc}

program test;

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;
      }
    }
  }`;

> 
> After looking at Ryan's more complete example though, the use of {$mode 
> SomeLanguageMode} *before* pushing {$H+} does seem to make {$H+} not 
> recognized. I do not believe that this behaviour is related to any code I've 
> added so far, however, as I don't see how it possibly could be. Seems like a 
> bug that nobody came across before.

Then it’s a bug I guess? That would be nice to fix because it will be a problem 
for exiting code if we’re forced to turn on H+ for the entire unit. It’s 
probably not related to your code I agree. If anyone know if this is a bug/can 
be fixed please let me know.

Regards,
        Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to