[SOLVED] Error TStringHelper.LastIndexOf ? lazarus / 62-General ---------------------------------------------------------------------- Thausand · 2019-04-01 08:25 I write Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program testerror; {$MODE OBJFPC}{$H+} uses  sysutils;  var  s1,s2: String;  n: integer;begin  s1:= 'TEST3';  s2:= 'TEST1/TEST2/TEST3';  n:= s2.LastIndexOf(s1);  WriteLn('n = ', n);end.  I compile Code: [Select]fpc -B -glh testerror.pas Free Pascal Compiler version 3.0.4-r37149 [2019/03/13] for arm Copyright (c) 1993-2017 by Florian Klaempfl and others Target OS: Linux for ARMHF Compiling testerror.pas Assembling testerror Linking testerror /usr/bin/ld: warning: link.res contains output sections; did you forget -T? 16 lines compiled, 0.1 sec I run: Code: [Select]$ ./testerror Write me Code: [Select]Segmentation fault I not understand. I make error ? ---------------------------------------------------------------------- ptvs · 2019-04-01 10:30 No, this method is not implemented in FPC 3.0.4 ---------------------------------------------------------------------- Thaddy · 2019-04-01 11:09 Quote from: ptvs on April 01, 2019, 12:30:10 pmNo, this method is not implemented in FPC 3.0.4 No it is already in 3.0.4. (Otherwise it would not compile). It may be that there was a bug which should be fixed in FPC 3.2.0. Anyway your code compiles and works with 3.2.0 and trunk 3.3.1-41807. I tested on Raspbian Jessie. ---------------------------------------------------------------------- Thausand · 2019-04-01 11:21 Quote from: Thaddy on April 01, 2019, 01:09:39 pmNo it is already in 3.0.4. (Otherwise it would not compile). It may be that there was a bug which should be fixed in FPC 3.2.0. Ok. i just see source and is there 3.0.4. Thank for say Thaddy QuoteAnyway your code compiles and works with 3.2.0 and trunk 3.3.1-41807. I tested on Raspbian Jessie. Many thank for try 3.2.0. I now usage more better solution and not use LastIndexOf  I also try 3.2.0 and write that work. I solve thread. Fix is 3.2.0 not use LastIndexOf fpc 3.0.4