Understood, ok. Thanks for your explanation.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
On 11/11/2022 11:49, Thomas Kurz via fpc-pascal wrote:
Why do I have to explicitly cast Integer to Double here?
Because 1.2E6 can be represented exactly by single precision.
You can use -CF64 to force floating point constants to have at least 64
bits precision. Or you can use {$excessprecisio
That's a funny interaction between Variants and Pascal's ambiguous
(logical or bitwise) "and" :) Both the operators and the types are
ambiguous -> making the boolean short-circuit evaluation not possible.
Indeed one workaround is to cast the variants to Booleans explicitly,
which makes it use logi
Am 24.05.22 um 19:28 schrieb Thomas Kurz via fpc-pascal:
Dear all,
please consider the following code:
program Project1;
{$booleval off}
var
v1, v2: variant;
a: boolean;
b: integer;
begin
a := true;
b := 0;
// this works as expected:
if a and (b > 0) and ((0+1) mod b =
Am 25.01.2022 um 18:48 schrieb Thomas Kurz via fpc-pascal:
Consider the following code:
***
PROGRAM project1;
{$mode objfpc}
{$longstrings on} // see output below
{$modeswitch advancedrecords}
USES Variants, Generics.Collections, SysUtils;
TYPE TRecord = PACKED RECORD
FID: NativeUInt;
F
Am 25.02.2021 um 13:38 schrieb Bo Berglund via fpc-pascal:
On Thu, 25 Feb 2021 10:59:14 +0100, Marco van de Voort via fpc-pascal
wrote:
Op 2021-02-25 om 10:12 schreef Bo Berglund via fpc-pascal:
I am installing fpc 3.2.0 on a notebook running Ubuntu 20.04 LTS
When I execute make clean and mak
On Thu, 25 Feb 2021 13:38:30 +0100, Bo Berglund via fpc-pascal
wrote:
>>Missing FPC install. It can't find a "fpc" binary
>
>Is this a hen-and-egg situation?
>
>I am installing fpc/lazarus for the first time on this computer and I am doing
>it from sources. So there is no previous compiler excep
On Thu, 25 Feb 2021 10:59:14 +0100, Marco van de Voort via fpc-pascal
wrote:
>
>Op 2021-02-25 om 10:12 schreef Bo Berglund via fpc-pascal:
>> I am installing fpc 3.2.0 on a notebook running Ubuntu 20.04 LTS
>> When I execute make clean and make sourceinstall I get this strange output
>> message:
Op 2021-02-25 om 10:12 schreef Bo Berglund via fpc-pascal:
I am installing fpc 3.2.0 on a notebook running Ubuntu 20.04 LTS
When I execute make clean and make sourceinstall I get this strange output
message:
:~/dev/fpc/3.2.0$ time make sourceinstall PREFIX=$HOME
make: -iVSPTPSOTO: Command n
Am 13.08.2020 um 22:37 schrieb Bo Berglund via fpc-pascal:
I am working on the conversion of a service application from
Windows/Delphi to Linux/FPC.
When going through the code I found this procedure, which I do not
quite understand the workings of, can someone please explain how it
operates?
p
Reported: https://bugs.freepascal.org/view.php?id=37496
вт, 4 авг. 2020 г. в 15:25, Joost van der Sluis :
> Op 01-08-2020 om 14:32 schreef Виктор Матузенко via fpc-pascal:
> > Error: Undefined symbol:
> > DPARSER_$$_PARSEHEXU32UNSAFE$PCHAR$PCHAR$LONGWORD$$LONGWORD
> >
> > What's my next step? Sen
Op 01-08-2020 om 14:32 schreef Виктор Матузенко via fpc-pascal:
Error: Undefined symbol:
DPARSER_$$_PARSEHEXU32UNSAFE$PCHAR$PCHAR$LONGWORD$$LONGWORD
What's my next step? Sending the example to bug tracker?
Yes, please.
Regards,
Joost
___
fpc-pasca
removing inline keyword resolve the problem
seems a bug
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
сб, 1 авг. 2020 г. в 13:26, Alexey via fpc-pascal <
fpc-pascal@lists.freepascal.org>:
> Did you try to delete all "lib" dirs in your project? (compiled units)
>
Yes, I did. The error is reproducible and the same each time I run clean
build.
I've got a minimal reproducible example with similar er
Did you try to delete all "lib" dirs in your project? (compiled units)___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
On Sat, Nov 23, 2019 at 7:47 PM Bart wrote:
As I was afraid: User error!
Cfg.JSONOptions := Cfg.JSONOptions + [joIgnoreTrailingComma];
This forces a reload of the file (since Filename isn't empty at this point).
(B.t.w. fpc trunk raise an error :
An unhandled exception occurred at $00438A84:
EJ
On Sat, 23 Nov 2019, Bart via fpc-pascal wrote:
Hi,
I experienced some strange behaviour with TJSONConfig.Clear.
I'm using fpc 3.0.4 32-bit on Win10-64.
(While I do have fpc trunk as well, the program is a Lazaurs GUI
program and I don't like using Lazarus (trunk) in combination with fpc
trun
On Thu, 18 Jan 2018 20:31:20 +0100
Darius Blaszyk wrote:
> > Hi, I can only say that TDOMNode from Laz2_DOM in trunk has function
> > CompareName.
>
> I'm using FPC 3.0.4 indeed. No dependency to the LCL.
Laz2_DOM is in LazUtils, not in the LCL.
Mattias
_
: [fpc-pascal] Strange issue with TXMLConfig
Hi, I can only say that TDOMNode from Laz2_DOM in trunk has function
> CompareName.
I'm using FPC 3.0.4 indeed. No dependency to the LCL.
Darius
___
fpc-pascal maillist - fpc-pascal@lists.freepa
Hi, I can only say that TDOMNode from Laz2_DOM in trunk has function
CompareName.
I'm using FPC 3.0.4 indeed. No dependency to the LCL.
Darius
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/list
The second TDOMNode from unit DOM (fcl-xml) has that function too, in FPC 3.0.4.
V.
__
Od: Vojtěch Čihák
Komu: FPC-Pascal users discussions
Datum: 18.01.2018 00:30
Předmět: Re: [fpc-pascal] Strange issue with TXMLConfig
Hi, I can
Hi, I can only say that TDOMNode from Laz2_DOM in trunk has function
CompareName.
V.
__
Od: Darius Blaszyk
Komu: FPC-Pascal users discussions
Datum: 18.01.2018 00:11
Předmět: [fpc-pascal] Strange issue with TXMLConfig
All of a sud
On 1/22/2014 5:39 PM, Frederic Da Vitoria wrote:
2014/1/22 waldo kitty mailto:wkitt...@windstream.net>>
the string type is/was a 256 character array with the 0th (zero-th) element
containing the length of the string... this allowed one to immediately know
how many characters to read
2014/1/22 waldo kitty
> the string type is/was a 256 character array with the 0th (zero-th)
> element containing the length of the string... this allowed one to
> immediately know how many characters to read at once... it was much faster
> than iterating thru the array looking for a nul byte as d
On 1/22/2014 1:00 PM, Jürgen Hestermann wrote:
Am 2014-01-22 07:41, schrieb leledumbo:
Jürgen Hestermann wrote
Realy?
But why that?
It cannot be negative.
Using integer instead of unsigned values reduces the possible (positive)
range
and produces such illogical (to me) compiler warnings.
Delp
On 22.01.2014 19:00, Jürgen Hestermann wrote:
Am 2014-01-22 07:41, schrieb leledumbo:
Jürgen Hestermann wrote
Realy?
But why that?
It cannot be negative.
Using integer instead of unsigned values reduces the possible (positive)
range
and produces such illogical (to me) compiler warnings.
Delph
Am 22.01.2014 19:00, schrieb Jürgen Hestermann:
>
> Am 2014-01-22 07:41, schrieb leledumbo:
>> Jürgen Hestermann wrote
>>> Realy?
>>> But why that?
>>> It cannot be negative.
>>> Using integer instead of unsigned values reduces the possible (positive)
>>> range
>>> and produces such illogical (to
Am 2014-01-22 07:41, schrieb leledumbo:
Jürgen Hestermann wrote
Realy?
But why that?
It cannot be negative.
Using integer instead of unsigned values reduces the possible (positive)
range
and produces such illogical (to me) compiler warnings.
Delphi compatibility and maximum data size limitatio
Jürgen Hestermann wrote
> Realy?
> But why that?
> It cannot be negative.
> Using integer instead of unsigned values reduces the possible (positive)
> range
> and produces such illogical (to me) compiler warnings.
Delphi compatibility and maximum data size limitation AFAIK (2 GB).
--
View this
Am 2014-01-21 18:43, schrieb Howard Page-Clark:
On 21/01/2014 17:33, Jürgen Hestermann wrote:
I always wondered why I get a compiler message for the following code
...
if i+length(M)
Length is declared in the compiler/RTL to return an integer result.
Realy?
But why that?
It cannot be negati
On 21/01/2014 17:33, Jürgen Hestermann wrote:
I always wondered why I get a compiler message for the following code
...
if i+length(M)
Length is declared in the compiler/RTL to return an integer result.
Howard
___
fpc-pascal maillist - fpc-pascal
Am 08.05.2013 12:37, schrieb Darius Blaszyk:
Am 08.05.2013 11:40, schrieb Darius Blaszyk:
Am 08.05.2013 11:20, schrieb Darius Blaszyk:
I'm working on a glut app but I keep on getting the message:
Error: Can't assign local procedure/function to procedure
variable The
> Am 08.05.2013 11:40, schrieb Darius Blaszyk:
>
> Am 08.05.2013 11:20, schrieb Darius Blaszyk:
> I'm working on a glut app but I keep on getting the message: Error: Can't
> assign local procedure/function to procedure variable The error is at this
> line: glutDisplayFunc(@redrawfunc); And th
Am 08.05.2013 11:40, schrieb Darius Blaszyk:
Am 08.05.2013 11:20, schrieb Darius Blaszyk:
I'm working on a glut app but I keep on getting the message: Error:
Can't assign local procedure/function to procedure variable The
error is at this line: glutDisplayFunc(@redrawfunc); And the
callback (w
> Am 08.05.2013 11:20, schrieb Darius Blaszyk:
>
>> I'm working on a glut app but I keep on getting the message: Error: Can't
>> assign local procedure/function to procedure variable The error is at this
>> line: glutDisplayFunc(@redrawfunc); And the callback (which is declared in
>> the same
Am 08.05.2013 11:20, schrieb Darius Blaszyk:
I'm working on a glut app but I keep on getting the message: Error:
Can't assign local procedure/function to procedure variable
The error is at this line: glutDisplayFunc(@redrawfunc);
And the callback (which is declared in the same .inc file) is
Hi Tomas,
That did the trick! I didn't notice the dialogs unit in the implementation
section. After removing it everything works fine now. I got opencv running on
windows and displaying the webcam feed on a opengl texture. I will put the code
on the ccr as soon as I have access again. In the co
On Thu, May 17, 2012 11:07, dhkblas...@zeelandnet.nl wrote:
> Second try. My previous email with attachement got blocked
> probably. I will send the files now in two emails. Just put everything
> together in one folder.
First, I'd recommend renaming your main program from video.pp to
something
On Thu, May 17, 2012 10:11, dhkblas...@zeelandnet.nl wrote:
Hi,
> I have a simple application that uses glut and opencv.
> However as soon as I add the opencv wrapper unit to the uses clause I
> get:
>
> video.pp(10,1) Fatal: Syntax error, "UNIT" expected but "PROGRAM"
> found
>
> The compiler d
On 17.05.2012 10:11, dhkblas...@zeelandnet.nl wrote:
Hi,
I have a simple application that uses glut and opencv. However as soon
as I add the opencv wrapper unit to the uses clause I get:
video.pp(10,1) Fatal: Syntax error, "UNIT" expected but "PROGRAM" found
The compiler does not recognize the
On 29 Mar 2011, at 13:12, Felipe Monteiro de Carvalho wrote:
In this thread: http://www.lazarus.freepascal.org/index.php/topic,12585.0.html
I though that maybe posting here would help, since the user has some
problems with some strange errors which say nothing to me =)
The last question/answ
Fixed! It was some really strange interference with different g_types...
The reason for all this was some duplicate code.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On Mon, 5 Apr 2010 17:04:55 +0200
Jonas Maebe wrote:
> Unlikely. You can always disable the explicitly with -O-. Without a
> compilable example program that demonstrates the problem I cannot help
> further.
Ok... Thanks! Will try to extract the important part.
John
_
On 05 Apr 2010, at 16:36, John Coppens wrote:
> gives:
>
> 654 if ch = eofchar then
> (gdb) n
> 655 sy := sps[ch]
> (gdb)
> 659 goto 1;
> (gdb)
> 661 symbol_read := true;
>
> Does this have anything to do with optimizations?
Unlikely. You can always disable
On Mon, 5 Apr 2010 16:21:33 +0200
Jonas Maebe wrote:
> This usually means that you modified the file since it was loaded in
> the debugger.
And it still gives some strange result:
if ch = eofchar then
sy := sps[ch]
else begin
error(erchar);
nextch;
g
On 05 Apr 2010, at 16:27, John Coppens wrote:
> Doesn't gdb detect source code changes? It's been a while, but I seem to
> remember gdb warning about the C source file having been changed.
GDB warns if *on startup* the time stamp of a source file is newer than that of
the binary. If you change
On Mon, 5 Apr 2010 16:21:33 +0200
Jonas Maebe wrote:
> > I haven't seen this kind of problem before, not in Pascal nor in C.
> > Why is the '... to 1' appearing in the listing?
>
> This usually means that you modified the file since it was loaded in
> the debugger.
That was it - but it seems sl
On 05 Apr 2010, at 16:17, John Coppens wrote:
> I haven't seen this kind of problem before, not in Pascal nor in C.
> Why is the '... to 1' appearing in the listing?
This usually means that you modified the file since it was loaded in the
debugger.
Jonas___
thanks =) nicknames can be tricky...
--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Try the following...
Yury Sidorov
Cheers,
G.
On 19 March 2010 03:27, Felipe Monteiro de Carvalho wrote:
> Or at least does anyone know the e-mail of the user "jura" which
> submited the previous wince tests so that I can ask him how he did it?
--
Regards,
- Graeme -
_
Or at least does anyone know the e-mail of the user "jura" which
submited the previous wince tests so that I can ask him how he did it?
thanks,
--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freep
On Thu, Mar 11, 2010 at 8:15 AM, Bernd Mueller wrote:
> it looks, as if 2.4.x was not so well tested on Wince. Perhaps you could run
> the test suite and see if it is a compiler problem.
How can I do this?
--
Felipe Monteiro de Carvalho
___
fpc-pascal
Felipe Monteiro de Carvalho wrote:
What do you recommend? Simply creating a report?
http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi?os=17&cpu=6&version=0&date=
it looks, as if 2.4.x was not so well tested on Wince. Perhaps you could
run the test suite and see if it is a compiler pr
On 07 Mar 2010, at 19:18, Schindler Karl-Michael wrote:
> If I use Pa_IsFormatSupported from portaudio with a different sample rate
> than the default, I get a division by zero error or other arithmetic error.
...
> gdb backtrace shows that it is deep down in Apple libs (probably the reason,
>
Paul Ishenin wrote:
will be useless. Who wants to know that it was raised in Warn function?
Better to assign a caller address to that exception. For this we have
'at' keyword.
Thanks Paul! Your explanation makes perfect sense. Amazingly enough, I
have been using exceptions for many years, and
Graeme Geldenhuys wrote:
Hi,
While porting DUnit2 to Free Pascal I came across the following code.
I have never seen syntax like that, yet it is accepted by FPC and
Delphi compilers.
Is this documented in FPC docs? What does the '... at
' do?
Unfortunately I don't have any docs (fpc, delp
Hans Mårtensson wrote:
All right, but with former versions of FPC there was no message if all
memory was freed.
I've been getting the memory usage output for some time already. So that is
normal when heaptrc unit is enabled.
And because the message is marked "error", I thought that it migh
Vincent Snijders wrote:
Hans Mårtensson schreef:
When compiling a windows program with FPC version 2.2.4 with the
switch -dDEBUG (using the default configuration), after running the
program I get the following message:
-
Error
Heap dump by heaptrc unit
0 memory b
Hans Mårtensson schreef:
When compiling a windows program with FPC version 2.2.4 with the switch
-dDEBUG (using the default configuration), after running the program I
get the following message:
-
Error
Heap dump by heaptrc unit
0 memory blocks allocated: 0/0
0 memo
En/na Jonas Maebe ha escrit:
Is there a hard limit on the number of threads under
windows?
I'm pretty sure there is one for every OS.
If so, why no exception when I try to create more?
Because the Windows version of tthread.create does not check for any
errors. You can submit a bug report
On 22 May 2009, at 17:03, Luca Olivetti wrote:
While I was testing an unrelated issue, I discovered this: under
windows, with fpc 2.2.4, I try to start 1 thread (I know it's
absurd
but it's just a test) and have all of them linger around for 10
seconds.
The thread actually started are 1
Marco van de Voort wrote:
In our previous episode, Tom Verhoeff said:
This means that the if statement is passed 7 times without problem with
x = -1, and on the 8th pass, where x = -1 again, it bails out with an FPE.
Hmm, didn't the x87 copro stack had 7ish registers? And recursive you say?
:-
In our previous episode, Tom Verhoeff said:
> What makes things complicated, is that the program has a GUI
> through Lazarus, and that it is rather biggish, making it difficult
> to isolate the problem.
>
> The place where it complains is a simple statement
Sorry, forgot to mention a test/remedy
In our previous episode, Tom Verhoeff said:
>
> This means that the if statement is passed 7 times without problem with
> x = -1, and on the 8th pass, where x = -1 again, it bails out with an FPE.
Hmm, didn't the x87 copro stack had 7ish registers? And recursive you say?
:-)
___
> In a delphi app I came across the following syntax;
>
> with PropInfo^, PropType^^ do
>
> Which results in a "Error: Illegal qualifier". Has anyone an idea of what
> is meant here and how to port that to FPC? I'm puzzled.
with PropInfo^, PropType^^ do [...]
is the same as
with PropInfo^ d
On Fri, 8 Jun 2007, [EMAIL PROTECTED] wrote:
> In a delphi app I came across the following syntax;
>
> with PropInfo^, PropType^^ do
>
> Which results in a "Error: Illegal qualifier". Has anyone an idea of what
> is meant here and how to port that to FPC? I'm puzzled.
There is an extra (o
[EMAIL PROTECTED] schreef:
In a delphi app I came across the following syntax;
with PropInfo^, PropType^^ do
Which results in a "Error: Illegal qualifier". Has anyone an idea of what
is meant here and how to port that to FPC? I'm puzzled.
You have to check the definition carefully. IIRC f
On Fri, 07 Jul 2006 20:14:13 +0200
Vincent Snijders <[EMAIL PROTECTED]> wrote:
> or compile your code in tp mode (fpc -h for help about command line
> parameters).
>
> Vincent
> ___
> fpc-pascal maillist - fpc-pascal@lists.freepascal.org
> http://lis
Marc Santhoff wrote:
Am Freitag, den 07.07.2006, 14:40 -0300 schrieb John Coppens:
PrevProc: ShTableLine = DummyShLine;
Use
PrevProc: ShTableLine = @DummyShLine;
to tell fpc it's an address and no function call.
or compile your code in tp mode (fpc -h for help about command line
Am Freitag, den 07.07.2006, 14:40 -0300 schrieb John Coppens:
> PrevProc: ShTableLine = DummyShLine;
Use
PrevProc: ShTableLine = @DummyShLine;
to tell fpc it's an address and no function call.
Have fun,
Marc
___
fpc-pascal maillist - fpc-
On 9 jan 2006, at 17:18, Peter Rosendahl wrote:
Thank you for your quick answer, how do I get the new version? Is
the 2.0.2 available at this point the FIXED version,
2.0.2 is 2.0.2. It will not change.
or do I have to recompile from some unstable source ?
If you are using Windows, you c
Thank you for your quick answer, how do I get the new version? Is the 2.0.2
available at this point the FIXED version, or do I have to recompile from some
unstable source ?
/Peter
JM> On 9 jan 2006, at 17:03, Peter Rosendahl wrote:
>> With the EXACT same code compiled with different version
On 9 jan 2006, at 17:03, Peter Rosendahl wrote:
With the EXACT same code compiled with different versions of
Freepascal, one reads the string[2] as 2 letter and the other
version reads the entire line as string[2].
please can anyone explain this to and possible find a solution
It is a bu
[EMAIL PROTECTED] wrote:
Hi,
When I want to compile a unit, I get a strange error message:
Warning: Comment level 2 found
The lines involved do contain comments that use brackets {}.
Anybody any ideas what might be causing the compiler messages??
"Comment level 2 found" is only a warning,
>When I want to compile a unit, I get a strange error message:
>
>Warning: Comment level 2 found
Usually a simple mistake, such as an {open comment that you forgot to close..
they can be
tricky to see with your eyes at times.
--
L505
http://z505.com
___
- Original Message -
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
To: "FPC-Pascal users discussions"
Sent: Monday, June 20, 2005 7:37 PM
Subject: Re: [fpc-pascal] strange behaviour of readkey...or not
> Darius Blaszijk wrote:
>
> > Hi there,
> >
> >
Darius Blaszijk wrote:
> Hi there,
>
> I have a console app that reads keys being pressed and then does some
> action. In short it would be like this:
>
> repeat
> if fileage(myfile) <> imyfile then
> begin
> writeln('file changed');
> imyfile := fileage(myfile);
> end;
>
> ch :
--- Peter Vreman <[EMAIL PROTECTED]> wrote:
> >> An unhandled exception occurred at 0x080742B2 :
> >> ERangeError : Range check error
> >> $080742B2 SVDCMP2, line 337 of lsa2.pas
> >> $B924 P$LSA2_finalize_implicit, line 692 of lsa2.pas
> >>
> >> What makes it strange is that line 337
> I have 1.9.5 installed on a second computer. When I compile using
> the newer version, I get a slightly different error message:
>
> An unhandled exception occurred at 0x0807498D :
> ERangeError : Range check error
> $0807498D SVDCMP2, line 337 of lsa2.pas
> $0001
>
>> I compiled a pro
I have 1.9.5 installed on a second computer. When I compile using
the newer version, I get a slightly different error message:
An unhandled exception occurred at 0x0807498D :
ERangeError : Range check error
$0807498D SVDCMP2, line 337 of lsa2.pas
$0001
-Alan
--- Alan Mead <[EMAIL PROT
--- [EMAIL PROTECTED] wrote:
>
> {$H+}
> or
> {$H-}
>
> definitely works.
Sorry, by does nothing I meant that it does nothing to solve my
problems with strings. Of course, the fundamental problem is that I
don't fully understand anything but old-fashioned TP strings.
[EMAIL PROTECTED] seq-baye
On maandag, jul 14, 2003, at 20:31 Europe/Brussels, Alan Mead wrote:
If there is, I cannot find it. {$H} does nothing and I re-read the
portion of the docs that deal with the sting types again and I don't
see what I'm doing wrong.
There is a difference between longstrings and ansistrings. Ansistri
On Mon, 14 Jul 2003, Alan Mead wrote:
>
> --- James Mills <[EMAIL PROTECTED]> wrote:
> > On Mon, Jul 14, 2003 at 06:48:06AM -0700, Alan Mead wrote:
> > > I'm running into this string problem as well. I'd like to use
> > > strings longer than 255 but I get strange errors like:
> > >
> [...]
>
>
--- James Mills <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 14, 2003 at 06:48:06AM -0700, Alan Mead wrote:
> > I'm running into this string problem as well. I'd like to use
> > strings longer than 255 but I get strange errors like:
> >
[...]
> I believe there is a compiler switch.
If there is, I
On Mon, Jul 14, 2003 at 06:48:06AM -0700, Alan Mead wrote:
> I'm running into this string problem as well. I'd like to use
> strings longer than 255 but I get strange errors like:
>
> [EMAIL PROTECTED] seq-bayes]$ fpc mcmc3pl.pas
> Free Pascal Compiler version 1.0.6 [2002/05/23] for i386
> Copyri
I'm running into this string problem as well. I'd like to use
strings longer than 255 but I get strange errors like:
[EMAIL PROTECTED] seq-bayes]$ fpc mcmc3pl.pas
Free Pascal Compiler version 1.0.6 [2002/05/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Linux for i386
Compili
> Yes and no. Why is it so bad to write a function in that way ? It could
> of course be written two different ways, but I'd rather this way where I
> modify the string passed to the function.
>
> Explain it to me :) (I'm the only one that works on this project of
> ~30,000 LOC, so I don't see any
On Sun, Jul 13, 2003 at 09:56:20PM +0100, Matt and Lisa Emson wrote:
> > And yes Matt
> > Emson, I do understand why my original functions weren't working :)
>
> including the part about not passing Strings as var params too? ;-P
Yes and no. Why is it so bad to write a function in that way ? It c
> And yes Matt
> Emson, I do understand why my original functions weren't working :)
including the part about not passing Strings as var params too? ;-P
___
fpc-pascal maillist - [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pasc
On Fri, Jul 11, 2003 at 06:41:22AM -0700, Jeff Pohlmeyer wrote:
> (*
> How about using "set of char" instead of "array of char" ?
> That way, the compiler should be able to distinguish
> between the overloads...
> *)
> program repl;
>
> type
> tSetOfChar = set of char;
>
> procedure repl
> (*
> How about using "set of char" instead of "array of char" ?
> That way, the compiler should be able to distinguish
> between the overloads...
> *)
Yeah, that will work ;-) The only problem would be if he wanted to remove
specific patterns of chars, but I'm guessing this isn't the case.
(*
How about using "set of char" instead of "array of char" ?
That way, the compiler should be able to distinguish
between the overloads...
*)
program repl;
type
tSetOfChar = set of char;
procedure replace(chars: tSetOfChar; const replace: String; var s: String);
var
i: Integer;
begin
On Fri, 11 Jul 2003, Matt Emson wrote:
> > Normally the performance hit is nearly zero.
> > No copying is done, only a reference count is increased. As it is a
> > const, it cannot be assigned to anyway, so there will be no copy-on-
> > write operation.
> >
> > It is always a good idea to use 'C
> Normally the performance hit is nearly zero.
> No copying is done, only a reference count is increased. As it is a
> const, it cannot be assigned to anyway, so there will be no copy-on-
> write operation.
>
> It is always a good idea to use 'Const' parameters as it will stop you
from
> assigning
On Fri, 11 Jul 2003, Matt Emson wrote:
>
> BTW, if you are using longstrings, you shouldn't be passing by reference, as
> the longstring (AnsiString) is already a pointer. If FPC handles memory in a
> similar way to Delphi with respects to longstrings, it may cause a
> performance hit if the str
> Well ok thanks Matt, however I kind of already had this figured out, but
> was posting here to find out if there's a way around it (other than
> naming two separate functions)...
>
> Perhaps there isn't...
James,
only tested in Delphi, but the following would seem to work
procedure repla
On Thu, Jul 10, 2003 at 05:25:21PM +0100, Matt Emson wrote:
> > > procedure replace(search: String; replace: String; var s: String);
> > > procedure replace(const chars: array of char; replace: String; var s:
> String);
> >
> > A string, or a array of char?
>
> James, this (as Marco put it) was ex
> > procedure replace(search: String; replace: String; var s: String);
> > procedure replace(const chars: array of char; replace: String; var s:
String);
>
> A string, or a array of char?
James, this (as Marco put it) was exactly what I had in mind. The compiler
will have to make a decision, and a
On Thu, Jul 10, 2003 at 05:26:31PM +0200, Marco van de Voort wrote:
> > 15 replace(['0'..'9'], w, s);
> > (gdb) s
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > $08066073 in main () at test4.pas:15
> > 15 replace(['0'..'9'], w, s);
> > (gdb)
>
> Passin
> 15 replace(['0'..'9'], w, s);
> (gdb) s
>
> Program received signal SIGSEGV, Segmentation fault.
> $08066073 in main () at test4.pas:15
> 15 replace(['0'..'9'], w, s);
> (gdb)
Passing a set ( ['0'..'9'] ) to
> procedure replace(search: String; replace: String; var s
1 - 100 of 109 matches
Mail list logo