JM> And even then you should initialize strings. They are not quaranteed to be
JM> empty.
Sorry ... What ? It must be garanteed in ansistring mode! or
everything will simple kboom! There is no way to initialize a non
initialized string.
--
Best regards,
JoshyFun
z = a == b ? 1 : 2;
DWN> It's terse, but one gets used to it.
In near 20 years I was unable to find the reason and need of such
constructions, even when my first computer only have 3 Kb for source
code.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
2;
Is it correct ? From my point of view is much more reasonable to use
something like:
z := iff(a=b,1,2);
But to me it looks awful and a bit of c-ism and really horrible code
could be written:
z: Boolean;
begin
z := iff(a=b,iif(b=2,a=b,b<>a),not(a=b)
,Length(s));
retcode:=WriteFile(OutputH,s[1],Length(s),writ,nil);
writeln('');
writeln('Retcode: ',retcode,' Returned written bytes: ',writ);
End.
--
--
Best regards,
JoshyFun
_
(STD_OUTPUT_HANDLE));
s:='cami'+#$C3+#$B3+'n'; //camión
writeln('Length of string: ',Length(s));
writeln(' -> Returned written: ',OutputStream.write(s[1],Length(s)));
OutputStream.free;
End.
--
Best regards,
JoshyFun
es 7
bytes and windows returns -6 characters- output rtl could understand
that a write error happends.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
,Length(s));
OutputStream.free;
End.
-
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
" shown using chcp 65001].
Sources can be compiled in fpc using UTF8 sources. Remember that most
linux have a default ANSI charset UTF8 while windows uses code page.
If you like put an attached small file to be compiled directly and the
command line to be used and I'll test it.
--
Be
NT 4.0 con fuentes TrueType en
ventana y muchos bats y similares dejan de funcionar.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
all the same the
same operation over and over again.
PS: Can anybody comment if this is expected ?
32 bits: ($8001 - 1) shr 31 = 1
64 bits: ($8001 - 1) shr 31 = -1
64 bits: DWORD($8001 - 1) shr 31 = 1
--
Best regards,
JoshyFun
_
unatly the code is quite
small.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
hr 31 = 1
64 bits: ($8001 - 1) shr 31 = -1
64 bits: DWORD($8001 - 1) shr 31 = -1
It looks like a problem in 64 bit versions :-? I think this topic
appears in the past about 32<->64 bits shift operations over signed
variables.
--
Best regards,
JoshyFun
__
gt;> version ?
MK> I'll try, but I think it won't work.
I hope to have some spare time this afternoon to test it, as I also
need LZMA decompress in 64 bit.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
bits "decode", and the same stream decompressed with the 64 bits
version ?
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Hello FPC-Pascal,
Sunday, January 24, 2010, 6:18:22 PM, you wrote:
JvdS> On Wed, 2010-01-13 at 16:13 +0100, JoshyFun wrote:
>> I wish to fix this bug http://bugs.freepascal.org/view.php?id=15460
>> but I had found serious problems to understand how data is structured
>>
reason ?
I'm using FPC 2.5.1 + Lazarus SVN + WinXP SP3 + Firebird 2.1
Thank you.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
ill take 2 minutes anyway. Is there a faster
way to correctly build only the affected package (in this case fcl-db)
?
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
i-project" is the same but with a ZIP attached at the end
where the application read its internal data structures and some
graphics.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
7;);
From my point of view that's a dynamic array, if it looks like a
dynamic array ir should be a dynamic array.
Other pascals uses something like:
a: array[1..] or string = ('aaa', 'bbb', 'ccc');
or
a: array[..] or string = ('aaa&
.
I think it will happend in any platform when the temp folder points to
somewhere with spaces.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
, but no longer, thats
i> what it was saved in the first place.
Please check the ":)" smiley at the end...
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Hello FPC-Pascal,
Tuesday, December 22, 2009, 3:18:27 PM, you wrote:
GG> JoshyFun wrote:
>> etc. For serious projects with important data it has many deficiences.
GG> I thought all data should be treated as important - otherwise why bother
GG> saving it. :-)
Check your temp fold
oblems if a field of type INT contains e.g. textual data, causing
MVC> a pascal application to crash.
MVC> (last time I checked, they called this "a feature")
Yes :) As far as I know, everything is a "text" field.
--
Best regards,
JoshyFun
__
with a
ZD> little directive for special queries).
SQLite is faster than Firebird, but take care that SQLite does not
enforce foreign keys, so data integrity must be handled by the
programmer "manually".
--
Best regards,
JoshyFun
___
fpc-p
appears only after it is called. In the former
So inlined methods should appear just after implementation keyword to
get inlined all along the code ?
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.
eate a general "Initializers.pas"
unit, which redefine FillChar and maybe some others like "Move", them
add the unit in the last position in your 3rd party unit and compile.
If everything is hint free, you can remove the unit and add a hints
ecause of a VERY specific use-case. That
GG> doesn't sound very "cross platform" to me??
out parameters seems to have a "difficult to predict" effects on some
types, I think interfaces could be affected by out parameters also and
anything that it's auto-freed by
e and there :)
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
and inline it, something like:
procedure MyFillChar(out x; count: SizeInt; Value: char); inline;
begin
{$PUSH}
{$HINTS OFF}
FillChar(x,count,Value);
{$POP}
end;
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
htt
ot;SizeUInt" and
"PIntegerArray" by "PSizeUintArray" (which definition seems to not
exist) should do the trick.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
ed');
GG> p1:= @Indata;
GG> p2:= @Outdata;
Insert this, or in other words "use it". The reason is that "fillchar"
first parameter is "var" instead "out".
Temp[0]:=0;
GG> FillChar(Temp, SizeOf(Temp), 0); // <--
ame system as Windows, post a custom message to
the application and the handler of that message notify the watchdog
thread with an acknowledge procedure. If acknowledge takes more than
"X" seconds them the "hang" in endless loop is quite sure. Or maybe
,msg="No symbol table is loaded. Use the
\"file\" command."
I'm not used to anything different than windows, but had you checked
that you are writting GDB information ?
--
Best regards,
JoshyFun
___
fpc-pascal maillist - f
quot;inteligent" editors.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
chars';
Move(C[1],A[0],Length(C));
B.Free; //Crash...
This will not be detected by runtime checks and I think it will not
also detected by heaptrc memory verifications. So take a look over the
prior declared variables, specially is they are arrays. As you are
running linux valgrind should
other hand the question is if that pascal code should work or
raise an error in 64 bits because I think that this code:
a := NativeInteger div NativeUnsignedInteger;
should have the same behaviour in 32 and 64 bits, so I do not know if
I must fill a
st regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
should be
iso-8859-1 and target encoding should be UTF8 to be displayed in a
memo box.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
h Windows
GetThreadID(ThreadHandle) function.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
xample of how things must be done, and there are
some data files mixed with source code files (not well organized).
It has been developed with Lazarus so maybe some code could need
lazarus LCL or related functions.
--
Best regards,
JoshyFun
___
f
Yes please!
I'll try to make it compile :) The code is mostly experimental, so
some functions are implemented to simply work and return a value not
to get the value fast.
I'll post a link in the list as soon as I can confirm that it at least
compile.
--
Best regards,
JoshyFun
nd a bit more.
The code is not optimized but if somebody wants to use them please ask
:)
The case of the SameText is specially CPU consumer as each string must
be transformed several times before the comparation is some complex
characters are present.
--
Best regards,
JoshyFun
__
casemapping(b)
is the same as:
IsSameText(a,b)
is wrong at unicode levels.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
en using know UTF8
LAPC> encoded strings
LAPC> Any hint on how to get UTF8 encoded strings at runtime?
Check your current source code format, this means the encoding of your
.pas file, quite sure it is still UTF-8, so simply:
Key := 'ç';
Right click -> Fil
his function
requires quite large tables and a non trivial amount of CPU (based in
the amount of folded code points).
Try to do the same with WideStrings instead UTF8.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
s store everything in WideString
format, regardless the input encoding. That's the reason you cast it
to WideString and them UTF8 encode it to be displayed by the LCL. I
think the cast is not needed, but as the string is a DOMString maybe
it is a must (not checked).
-
the text node
contains an ANSI german umlaute the XML is not valid as the text is
not UTF-8 conformant.
fpc UTF-8 decoder clear any UTF-8 string with wrong encode (I think
trunk one replace wrong encodes with '?' mark).
--
Best regards,
JoshyFun
___
ou must use pointers to avoid automatic string dispose.
end;
For sure it is not a generic function ;)
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
( p );
RS> end;
RS> end;
Aside from the socket problem, can somebody explain me this line:
RS> byte( p^ ) := 0;
? from my point of view it should be "PBYTE(P)^:=0;" am I
missing something ?
--
Best regards,
JoshyFun
___
+1 are impossible, or in
the worst case equal to nil again. Once you assigned nil to a pointer
the value becomes in range so it can be operated as usual.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
is case ?
I may be wrong, but "class procedure" and "of object" may be
incompatible even when the "class procedure" should be the same as a
regular "of object" one with an implicit nil passed.
Which FPC version are you using ?
--
Best regards,
JoshyFun
x
JM> - movl(%edx),%edx
JM> - movl(%edx),%edx
JM> - call*80(%edx)
JM> + callL_P$PROGRAM_TDEDERIVEDFOO_$__MYPROCEDURE$stub
JM> I'm not sure about -dvtentry.
Nice to see that, that's for sure a non easy objetive :)
--
Best regards,
JoshyFu
can be turned into normal function calls).
More or less I understand the WPO way of work. Thank you again.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
wing away virtual method
[...]
JM> that produces an error if you try to link a unit compiled with the
JM> option using the external linker), but that hasn't been done yet.
Just for curiosity which is the parameter set ?
Thank you for the answer.
--
Best regards,
JoshyFun
__
Hello FPC-Pascal,
If a virtual method of a class is not used at all in the programm will
the compiler remove it from the executable ?
I think that unused constants and functions will be removed by the
compiler or the linker but the methdos of a class... :-?
--
Best regards,
JoshyFun
ink it
should look like:
SetLength(Prefix, Length(aPrefix));
SetLength(NumberLength, Length(aNumberLength));
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
in
my code at all), so I think that they comes from the internal
initializations of variables and records, unfortunatly the calls
counter does not appear (spontaneous), and the fact that heaptrace
produces faster code makes me think in the memory manager, but with
ust check
that Lazarus is passing all parameters well to fpc...
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
check,
optimization level 2 or 3 and not using heaptrace ?
I had expected around a 5% faster with the non-checks config, but I
get a 2% slower program :-?
Everything has been tested using Lazarus 1 month SVN, using a 1 minute
runtime check.
--
Best regards,
Jos
ot;may change" ? :-?
MvdV> The docs are the primary source, the language ref should have a table
MvdV> somewhere near the start. I sometimes use it, because I always forget
which
MvdV> is 8-bit signed and which is 16-bit signed. (which is why I never use them
MvdV> and alway
X?
Where LongInt fits ? Bits dependent or not ?
Maybe a table is available in the wiki, but I was unable to find it.
Thank you.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.
It's the UTF8ToUnicode provided by fpc which is more or less the same
as the Delphi one, kills the output on any error, and allow other
errors to be passed away to the result string which will bypass some
security functions.
--
Best regards,
JoshyFun
__
ed I don't
JH> understand why the whole string is dropped when not using AnsiToUTF8.
JH> Without the conversion I would expect to see incorrect characters
JH> instead of the umlauts.
The UTF8Decode routine kills any string with malformed UTF8 sequences.
http://bugs.freepascal.org/vie
Hello Mark,
Saturday, December 20, 2008, 1:40:15 PM, you wrote:
MML> Already am using (*$MODE DELPHI *)
Hmmm... this should be {$MODE DELPHI} do not ? using (* *) you get a
comment, or maybe I'm wrong ?
In Delphi mode you must not need the @ for procedural assigns.
--
Best regards,
FPC 2.2.2 the line:
Mask := 1 shl i;
must be changed by
Mask := DWORD(1) shl i;
or it raises a runtime 201 error when i = 31.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/lis
c') not the same in
GB> every line in a text file.
GB> Is a function/procedure still exists in FPC or Lazarus for this problem.
GB> If anybody understood me. ;-)
Look for "SScanf" function, maybe it will fit your needs.
--
Best regards,
JoshyFun
___
l only see "GetMem" procedure.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
ts says that the memory occupation was only around
15% in excess.
I'll search the hard disk for the test routine, maybe it is still
somewhere in the HD.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://li
ml
Thank you for the tips.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
pages
seens to be only half filled using the calculator and a rude
aproximation, so I'll try to put all the small objects in a single
block and see what happends with the memory (and also learn a bit more
about fpc ;) ).
--
Best regards,
JoshyFun
__
thing like overriding the
create method like:
constructor MyObject.Create()
begin
result:=GetMem(sizeof(myobject));
end;
Thank you.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.o
he same way... quite sure.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
anything.
From my side it looks like a transparent proxy problem, so setting an
alternative port different then 80 may help. Maybe somebody that can
successfully access should dump the received http headers, maybe one
of them is confusing the transparent proxy :-?
cessing the feed, so it looks like a
Telefónica Data problem.
--
Best regards,
JoshyFun
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
e(const OnChange: TNotifyEvent =nil): ISimple;
begin
Result :=QuerySimple2(OnChange);
end;
It is not very elegant, I know :)
--
Best regards,
JoshyFunmailto:[EMAIL PROTECTED]
___
fpc-pascal maillist - fpc-pas
75 matches
Mail list logo