Re: [fpc-pascal] RPos Causing Access violation

2019-05-21 Thread James Richters
To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] RPos Causing Access violation On Tue, May 21, 2019 at 2:18 PM James Richters wrote: > Function > ExtractFilePathAndNameWithoutExt(Filenametouse:String):String; > > Begin > >ExtractFilePathAndNameWithoutExt := >

Re: [fpc-pascal] RPos Causing Access violation

2019-05-21 Thread Bart
On Tue, May 21, 2019 at 2:18 PM James Richters wrote: > Function ExtractFilePathAndNameWithoutExt(Filenametouse:String):String; > > Begin > >ExtractFilePathAndNameWithoutExt := > copy(Filenametouse,1,rpos(ExtractFileExt(Filenametouse),Filenametouse)-1); > > End; From LazFileUtils unit: fu

Re: [fpc-pascal] RPos Causing Access violation

2019-05-21 Thread James Richters
e if it's really a memory related issue? Something like a writeln for stack space etc? James -Original Message- From: fpc-pascal On Behalf Of Marco van de Voort Sent: Tuesday, May 21, 2019 9:51 AM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] RPos Causing Access violati

Re: [fpc-pascal] RPos Causing Access violation

2019-05-21 Thread Marco van de Voort
Op 2019-05-21 om 14:18 schreef James Richters: Does anyone have any idea at all why RPOS could not determine that the position of .dpax in M:\elipse_1.dpax was 12 like every other time I ran this I ran this while looking at task manager and it starts up with 9.2MB of memory and

[fpc-pascal] RPos Causing Access violation

2019-05-21 Thread James Richters
This is my function that seems to cause this more than anything else… it’s ridiculously simple… Function ExtractFilePathAndNameWithoutExt(Filenametouse:String):String; Begin ExtractFilePathAndNameWithoutExt := copy(Filenametouse,1,rpos(ExtractFileExt(Filenametouse),Filenametouse)-1); E