[fpc-pascal] FpcGui, MSEGui

2023-01-22 Thread Santiago A. via fpc-pascal
Have you worked with both? Both are pure FreePascal GUIs, not depending of ant external library. What are the differences? Which one do you think is more mature,  supported, fetaures, etc...? Just a little of flame is not bad ;-) -- Saludos Santiago

[fpc-pascal] Bookmark, TBookmarkStr, TBytes and BytesOf

2021-08-26 Thread Santiago A. via fpc-pascal
with the text below,  it does the opposite, returns the string in an array of bytes. Is there any function that move the bytes to an AnsiString? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepasca

[fpc-pascal] function const default argument

2021-08-26 Thread Santiago A. via fpc-pascal
x:extended; const delta:extended=DefaultDelta):extended; function G(const x:extended; const delta:extended=DefaultDelta):extended; But I get "Illegal expression" in the header function declaration. Const parameters don't accept const expressions? -- Saludo

Re: [fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

2021-01-12 Thread Santiago A. via fpc-pascal
if you don't use it. I have, because it is seldom used, it looks like every device/system still works only with IPV4 -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-09 Thread Santiago A. via fpc-pascal
    BlockWrite( F, _S[1], Length( _S)); finally     CloseFile( F);     end; end; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinf

Re: [fpc-pascal] stdcall without the ;

2020-09-24 Thread Santiago A. via fpc-pascal
El 23/09/2020 a las 19:45, Luca Olivetti via fpc-pascal escribió: El 23/9/20 a les 17:38, Santiago A. via fpc-pascal ha escrit: El 23/09/2020 a las 13:54, Luca Olivetti via fpc-pascal escribió: Hello, I just compiled a lazarus project made in 2105 with fpc 3.2.0 and, while it works here

Re: [fpc-pascal] stdcall without the ;

2020-09-23 Thread Santiago A. via fpc-pascal
El 23/09/2020 a las 13:54, Luca Olivetti via fpc-pascal escribió: Hello, I just compiled a lazarus project made in 2105 with fpc 3.2.0 and, while it works here, it fails when the customer runs it. What does "it fails" mean? Any error message? Sigfault? -- Saludos

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-12 Thread Santiago A. via fpc-pascal
rid of it, the worse. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Converting http date back to TDateTime

2020-04-30 Thread Santiago A.
El 29/04/2020 a las 19:31, Zamrony P. Juhara via fpc-pascal escribió: Yes, it works if I remove timezone part from pattern as suggested by Santiago. This one works adatetime := scanDateTime(      'ddd, dd mmm hh:mm:ss',      'Tue, 28 Apr 2020 10:11:12 GMT'); So i guess, we must convert

Re: [fpc-pascal] Converting http date back to TDateTime

2020-04-29 Thread Santiago A.
ércoles" (e with acute accent) and Tuesday is "Martes": "mar, 28 abr 2020" works, but "Mié, 29 Abr 2020" fails. I think that the problem is that é  uses two bytes in UTF-8, but scan only deals properly with single byte characters -- Saludos Santiago A.

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-13 Thread Santiago A.
ngerous garbage. So, in pascal,  you don't test if a variable contains an uninitiliazed value, you initialize it before referring the variable. And before assigning a value, you verify it is in the range. -- Saludos Santiago A. ___ fpc-

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-13 Thread Santiago A.
El 13/03/2020 a las 15:49, fredvs via fpc-pascal escribió: Hello Santiago. What do you think? IMHO ---> kind := tabulatorkindty(-1); makes no sense. Why should you initialize a variable on purpose to an out-of-range value? If you need a sentinel value, or a non valid value, create one, l

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-13 Thread Santiago A.
I'd probable would add a value tk_invalid. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] specify variable name with string variable

2019-07-09 Thread Santiago A.
and values from Ini file PorList[Pin_1].init('Pin-1',@); PorList[Pin_2].init('Pin-2',@); // call PortList[pin_1].PortPin:=true; PortList[pin_2].PortPin:=false; end. Or you can use a TFPGMap from the standard library fgl. -- Saludos Santiago

Re: [fpc-pascal] specify variable name with string variable

2019-07-08 Thread Santiago A.
operators and reference a simple variable, you must use a more convoluted syntax. As far as I see, you don't intend to let the program create new vars in runtime, you just want to write the identifiers of the vars you have hardcoded.  Is it worth? (I hope it is not just for debugging) -- Saludos

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread Santiago A.
ilenum>=File_Stringlist.Count; Replace with Target_File:=IncludeTrailingPathDelimiter(File_Stringlist[0]);     for file_num:=1 to File_Stringlist.count-1 do Process_File(Target_File+File_Stringlist[Filenum]); FOR is you friend -- Saludos Santiago A. ___

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-22 Thread Santiago A.
, probably overwrite in some place. It doesn't look the problem is here. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] XML - Indent, text content, special char

2019-04-28 Thread Santiago A.
or special chars, XML is not the right format for you. Consider it -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Public key algo pascal only

2019-04-08 Thread Santiago A.
ternal use (you are in charge of both ends of communication) and not for critical top secret, it could be enough. I don't think you will find anything much more simpler. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepasca

Re: [fpc-pascal] Rest in peace Martin Schreiber

2018-12-27 Thread Santiago A.
knowledgeable in his field. He will definitely be missed by many. Our hearts and prayers go out to his family and friends. Rest in peace Martin Schreiber. Regards, Graeme Oh my! what a sad and unexpected news! My condolences to his friends and family. How old was he? -- Saludos Santiago

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Santiago A.
no project in then foundation related to improve debugger. Am I the only one who thinks that poor debugger is a stopper? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can't determine which overloaded function to call

2018-12-05 Thread Santiago A.
iority. do  (LongInt -> Integer) and (Longint -> single) have the same priority? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can't determine which overloaded function to call

2018-12-04 Thread Santiago A.
)); or r1.Offset(Integer(a-1),Integer(b-1)); -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-12 Thread Santiago A.
nt the editor to let you write the real code. It is an over simplification, but hope it has helped a little. But well, as I said, everybody has his own epiphany. Good luck -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] Order of Precedence: FPC/Delphi vs Java

2018-10-06 Thread Santiago A.
El 06/10/18 a las 20:48, Graeme Geldenhuys escribió: On 03/10/18 20:05, Santiago A. wrote: I don't know why you want to compare two floats, but you'd better use currency type. I fully understand that. We do financial calculation up to 6 decimal places, so can't use Currency data type. 6

Re: [fpc-pascal] Order of Precedence: FPC/Delphi vs Java

2018-10-03 Thread Santiago A.
er the language or precision. So, it is matter of probability to get 1. or 1.0001 or 0., if you expect 1, psychologically 1.0001 looks better result than 0.. Dephi or Freepascal are doing nothing wrong. -- Saludos Santiago A. ___ f

Re: [fpc-pascal] Hint converting to int64

2018-09-11 Thread Santiago A.
El 11/09/18 a las 12:30, Mark Morgan Lloyd escribió: On 11/09/18 10:15, Santiago A. wrote: Hello:FPC: 3.0.4 (Realease from Lazarus 1.8.4 SVN: 57972)OS: Windows7 32bits / Linux 64Bits I have this code and I get a hint -- var  Entity:Longword;FullParagraph:string; pIni:Integer; begin

[fpc-pascal] Hint converting to int64

2018-09-11 Thread Santiago A.
I have casted the result of "ord()" to longword. But I get the same hint. What should I do to remove the hint? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Assigning open array

2018-07-31 Thread Santiago A.
? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Syntax changes suggestions

2018-07-23 Thread Santiago A.
reasons. How difficult is to implement for the compiler is a limit if our skills or state of art of compilers imposes, not a feature. Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Santiago A.
external tools? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Santiago A.
.  In such cases, a "For the sake of brevity, my vote is simply "no" to all your suggestions." is the best answer. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Santiago A.
El 16/07/2018 a las 13:59, Michael Van Canneyt escribió: On Mon, 16 Jul 2018, Santiago A. wrote: I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside blocks, and loop variables - Autofree pointers - Try except

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Santiago A.
El 16/07/2018 a las 15:02, Sven Barth via fpc-pascal escribió: Santiago A. mailto:s...@ciberpiula.net>> schrieb am Mo., 16. Juli 2018, 13:41: I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside

[fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Santiago A.
rface, and needn't to be declared. The same could be applied for private vars. : -- implementation var  TMyClass.privateVar: Integer; -- I suppose this is more difficult with variables than with methods, because of reserving memory etc, but it would be handy. -- Saludos S

Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-03 Thread Santiago A.
El 03/07/2018 a las 14:33, Wolf escribió: PS.: while composing this mail, Santiago wrote:  Pascal needs to break backward compatibility to advance, that is, in fact, a new language. But if pascal is struggling to survive, let alone a new language if you are not mozilla, google... In which

Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-03 Thread Santiago A.
to survive, let alone a new language if you are not mozilla, google... -Jim ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal -- S

Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-02 Thread Santiago A.
aludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] round(2.5)=2

2018-06-13 Thread Santiago A.
check  why it needs always round floor for 0.5 Klaus ___ fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal -- Saludos Santiago A. ___

Re: [fpc-pascal] Sqlite error sqlite3_extended_errcode SIGSDEV (better format)

2018-03-15 Thread Santiago A.
El 14/03/2018 a las 19:26, Luca Olivetti escribió: > El 14/03/18 a les 18:50, Santiago A. ha escrit: > >>   I downloaded the last version of sqlite3.dll and now it works. Was my >> dll corrupted or was too old and hadn't such entry?. Nevertheless, I >> think this che

Re: [fpc-pascal] Sqlite error sqlite3_extended_errcode SIGSDEV (better format)

2018-03-14 Thread Santiago A.
nd hadn't such entry?. Nevertheless, I think this check of nil should be done, or check the version and rise "Not valied for this version". A SIGSDEV may drive you nuts. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.

[fpc-pascal] Sqlite error sqlite3_extended_errcode SIGSDEV

2018-03-14 Thread Santiago A.
heless, I think this check of nil should be done, or check the version and rise "Not valied for this version". A SIGSDEV may drive you nuts. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] Range checks

2018-01-29 Thread Santiago A.
( qword(count) -  qword(1)) do try this: for i := 0 to *integer*(Count)-1 do -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] any existing units/libraries for sorting?

2018-01-03 Thread Santiago A.
El 03/01/2018 a las 16:09, Dennis escribió: > I have a list of records (each with a few fields). What do you mean with list? A TList? You can use sort method -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org h

Re: [fpc-pascal] Modern Compiler Construction using Pascal

2018-01-02 Thread Santiago A.
ilers written in Java, or Python or Perl compilers written in Python or Perl . As usual, the most popular language will be most used language: C, C++ -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepasca

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-21 Thread Santiago A.
ision. Obviously  it was too slow. And, by the way, BCD is also too slow for numeric operations. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Windows API SendMessage()

2017-08-10 Thread Santiago A.
could make my console I have found this: https://stackoverflow.com/questions/25011141/turn-off-on-monitor-cant-turn-on It's in c++, but it looks that since w.8, you must simulate a mouse move. -- Saludos Santiago A. ___ fpc-pascal maillist

Re: [fpc-pascal] Static local variables available?

2017-07-21 Thread Santiago A.
roblem is what to do to limit the visibility to the procedure. What about the old interface/implementation ways? You can't limit the visibility to the procedure, but you can limit the visibility to the implementation, so it is globally invisible. unit hiddenVar; interface p

Re: [fpc-pascal] Convert to int64 note

2017-07-15 Thread Santiago A.
rsion I would use "integer" instead of "longint" Last_GS:=G_End-(integer(Max_Program_To_Display)-1); "Integer" is the optimal integer format for that architecture, probably "longint", but I would use "integer" anyway. My two cents. -

Re: [fpc-pascal] Convert to int64 note

2017-07-14 Thread Santiago A.
operands to "Int64" as recommended? > > James > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal What's the type of each variable? -- Saludos Santiago A. __

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-10 Thread Santiago A.
finitely improve Lazarus/FPC public image. > It is not a matter of public image, it's a matter of usability, a "must have", a stopper. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-10 Thread Santiago A.
of an object is unacceptable in a modern professional environment (hint, properties with getter, let alone with strings). It's ridiculous to use writeln() or creating dummy variables to debug as if I were in 1980. You can add to the IDE as many bells and whistles as you want, but without a serious

Re: [fpc-pascal] Bug in documentation for Random?

2017-04-05 Thread Santiago A.
El 05/04/2017 a las 18:09, Bart escribió: > http://www.freepascal.org/docs-html/current/rtl/system/random.html > > "Random returns a random number larger or equal to 0 and strictly less than L" > > However random(a negative number) returns a number <= 0 and > L > > > program r; > begin >

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Santiago A.
ity against power failures, SSD is not the best idea. By the way. What about a SAI? ;-) -- Saludos Santiago A. s...@ciberpiula.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-02-22 Thread Santiago A.
d again what you have written to check whether it's ok. 4) Make a second backup. That way, when you load parameters you have two backups to recover. And maybe a clue of what's going wrong. Beside, I would add a timestamp inside the file. In addition, you could use flush and {$I-} -- Saludos S

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-02-22 Thread Santiago A.
h that with old programs. Fourth: What's the type BitFile? BitFile: TextFile; BitFile: File; Maybe using writeln with non-textfile files may cause problems. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists

Re: [fpc-pascal] fpc and voip ?

2017-02-02 Thread Santiago A.
Don't know rest of the world. Can it be worse than in USA? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to translate C macro

2017-01-03 Thread Santiago A.
you intend to do. Change the 32th backward element of an array of pointers? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC clean room project

2017-01-02 Thread Santiago A.
one has pointed, Embarcadero hasn't make any legal movement. Maybe because it thinks there is no legal base; or maybe because it doesn't care that much and thinks it's not worth the bad publicity. -- Saludos Santiago A. ___ fpc-pascal

Re: [fpc-pascal] Generic way to pre-maturely exit TCustomApplication without memory leaks

2016-10-13 Thread Santiago A.
cases I shouldn't, it's a dirty hack. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generic way to pre-maturely exit TCustomApplication without memory leaks

2016-10-13 Thread Santiago A.
rvive as long as the application is running. So wondering about what's in memory after a halt makes no sense, everything is freed. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] LowerCase vs. UnicodeLowerCase

2016-10-11 Thread Santiago A.
elated to THandle because it's not unusual that a unit declares a type THandle. In fact, it's logical that different units uses same names for similar concepts. Being aware of the order is a workaround that works, but it doesn't mean that relying on the order is the best idea. -- Saludos Sa

Re: [fpc-pascal] LowerCase vs. UnicodeLowerCase

2016-10-11 Thread Santiago A.
El 11/10/2016 a las 10:03, Marco van de Voort escribió: > In our previous episode, Santiago A. said: >> I think that "automatic overriding" is a wrong design from the first >> turbo pascal and should be fixed. The need of overriding system >> functions like m

Re: [fpc-pascal] LowerCase vs. UnicodeLowerCase

2016-10-11 Thread Santiago A.
xed. The need of overriding system functions like memory managers is a corner case to treat, not a reason to not solve the unexpected hide of declarations. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Checking the validity of Format and friends at compile-time

2016-10-06 Thread Santiago A.
tter of taste or whether there are serious technical reasons. If there are not severe design drawbacks, I would go for it. I love compile time checks. The more, the better. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Socket pair

2016-10-03 Thread Santiago A.
thing back to client. can anyone point and example with pair of sockets or bidirectional connection communication? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Asci85

2016-09-17 Thread Santiago A.
aString; > finally > > Because stream must be flushed before extracting result and the flush > is performed in the destroy. . > That's right. Solved! Thanks! -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepas

Re: [fpc-pascal] Ascii85

2016-09-16 Thread Santiago A.
El 16/09/2016 a las 10:16, Santiago A. escribió: > Hello: > > I'm trying to use ascii85 packages to decode/encode strings. But I get > this weird results: > > -- > Original Plain: 123456 > Correct Encoded: <~0etOA2)Y~> > > Encode 123456 = <~0

[fpc-pascal] Asci85

2016-09-16 Thread Santiago A.
d,Decoded])); Writeln; readln; end. - -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Windows console

2016-09-06 Thread Santiago A.
El 05/09/2016 a las 16:26, José Mejuto escribió: > El 05/09/2016 a las 15:01, Santiago A. escribió: >> Hello: >> >> I have a little watchdog utility for windows that runs each five >> minutes, like a unix cron ("Tareas programadas" in Spanish, scheduled &

[fpc-pascal] Windows console

2016-09-05 Thread Santiago A.
the help instead of having to open logs. Is there any way to open a console on the fly and send the output to the console? FPC 3.0.0 for Windows 7 and Windows XP -- Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepasca

Re: [fpc-pascal] Weird string behavior

2016-07-28 Thread Santiago A.
ings type. Automatic conversions? Well, I'm not for it, but any way, left side shouldn't change its codepage. Nevertheless, that's my two cents. I looks that there is some pressure to be Delphi XX compatible, I left Delphi long long time ago (Delphi 5), so these compatibility issue

Re: [fpc-pascal] Weird string behavior

2016-07-26 Thread Santiago A.
El 26/07/2016 a las 16:19, Michael Van Canneyt escribió: > > > On Tue, 26 Jul 2016, Santiago A. wrote: > >> El 26/07/2016 a las 12:27, Mattias Gaertner escribió: >>> a3:=a1+a2 => cp = 1252 >>> a3:=a2+a1 => cp = 65001 >> Is that the expected be

Re: [fpc-pascal] Weird string behavior

2016-07-26 Thread Santiago A.
El 26/07/2016 a las 12:27, Mattias Gaertner escribió: > a3:=a1+a2 => cp = 1252 > a3:=a2+a1 => cp = 65001 Is that the expected behavior? IMHO the result should be the same. And the only way is to make it depend on a3, no matter what is in the left side. That's the way things are done in Pascal

Re: [fpc-pascal] Weird string behavior

2016-07-22 Thread Santiago A.
This is Pascal, not bash or PHP. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Weird string behavior

2016-07-22 Thread Santiago A.
// Win-1252 And resultA is not equal to ResultB It doesn't look like too intuitive. I would say that it is closer to "hidden secret knowledge" than to the "Principle of least surprise". -- Saludos Santiago A. s...@ciberpiula.net ___ fp

Re: [fpc-pascal] Weird string behavior

2016-07-22 Thread Santiago A.
El 22/07/2016 a las 12:55, Bart escribió: > Just check the vaue of StringCodePage(Utf8StrA). Not Initialized AnsiStrA: 1252 ResultA: 1252 AnsiStrA:=' ' AnsiStrA: 0 AnsiStrA[1]:=#243; // o acute win-1252 AnsiStrA: 0 ResultA:=AnsiStrA ResultA: 0 ResultA := AnsiStrA + ' ' ResultA:

Re: [fpc-pascal] Weird string behavior

2016-07-22 Thread Santiago A.
El 22/07/2016 a las 0:32, Bart escribió: > On 7/21/16, Santiago A. <s...@ciberpiula.net> wrote: > >> I've come across this issue: When I concatenate two strings in UTF8 they >> are converted to ansi (Win-1252) . > You have declared all string variables as plain &q

[fpc-pascal] Weird string behavior

2016-07-21 Thread Santiago A.
Hello: I'm working on windows XP, FPC 3.0.0 from stable Lazarus 1.6. I've come across this issue: When I concatenate two strings in UTF8 they are converted to ansi (Win-1252) . A bug? Am I missing something? I have attached a demo. -- Saludos Santiago A. program testconvertstr

Re: [fpc-pascal] Resource strings, passwords etc.

2016-07-13 Thread Santiago A.
had to use it in several places, I used ($include pass.inc} My ofuscate function was a little more complex, and but anyway, any system that stores passwords without human intervention is inherently insecure. Well, it was long time ago. -- Saludo

Re: [fpc-pascal] how to expand a set?

2016-06-15 Thread Santiago A.
UsersMsgTaggedAreas is restricted to 256 different values or less. And, not sure, but I think if num is out of the range of values of UsersMsgTaggedAreas's base type then the 'in' test won't result true or false, but an error. -- Saludos Santiago A. __

Re: [fpc-pascal] how to expand a set?

2016-06-15 Thread Santiago A.
d? ?? What do you mean with "access"? You can't access the element of a set, you can say if the an element is in a set or not. msgAreas:=[1..7]; if (2 in msAreas) then ... -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.fre

Re: [fpc-pascal] code example where AnsiString used in FCL (SqlDB) causes data loss

2016-05-11 Thread Santiago A.
El 11/05/2016 a las 16:38, Michael Van Canneyt escribió: > >> FPC 3.0 adds unsafe auto-conversions > > Why do you think it is unsafe ? > I have an answer for this. In short: Different codepage strings and raw strings should be considered different incompatible types. Pascal is a hardtyped

[fpc-pascal] Lazarus vs MSEgui

2016-04-08 Thread Santiago A.
I know it is a dangerous question that can easily turn into a holly war, flame or whatever. But here it is. I have only used Lazarus or a general editor (usually Jedit, geany). Time ago I checked a little MSEgui and, well, I didn't go for it. In MSEgui I found fonts small and interface not very

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Santiago A.
ing the sql. You needed to prepare again the query. It is not that different from saving the original sql string and replacing certain parts, (in fact, I have done things like that). But it was handy. -- Saludos Santiago A. s...@ciberpiula.net ___

Re: [fpc-pascal] Class vs Object type

2016-04-07 Thread Santiago A.
El 07/04/2016 a las 13:04, Graeme Geldenhuys escribió: > On 2016-04-07 11:58, Santiago A. wrote: >> Moreover, if the object uses classes instances that must be freed, you >> also must call destructor, then any advantage is over. > Technically yes, but as a rule of thumb, I

Re: [fpc-pascal] Class vs Object type

2016-04-07 Thread Santiago A.
El 06/04/2016 a las 13:23, Graeme Geldenhuys escribió: > "The difference between objects and classes is mainly that an object is > allocated on the stack, as an ordinary record would be, and that classes > are always allocated on the heap." > > Are there pros or cons to either? > > Regards, > -

Re: [fpc-pascal] Bitcounting

2016-03-05 Thread Santiago A.
:= QWord(N); While Q>0 do begin inc(result,(Q and 1)); Q := Q shr 1; end; end; The while version is slower if the first bit is 1 > > Bart > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.free

[fpc-pascal] Objects, open arrays and memory leaks

2016-01-14 Thread Santiago A.
created. I know open array are implemented pointers but I supposed that runtime would take care of it, so I was using the constructor to clear object and start from scratch. What I am missing? -- Saludos Santiago A. ___ fpc-pascal maillist -

Re: [fpc-pascal] Problem with objects

2015-12-23 Thread Santiago A.
El 23/12/2015 a las 12:13, Dennis Poon escribió: > > > Santiago Amposta wrote: >> Hello: >> I use fpc 2.6.4 and I have a problem of memory leaks, strange errors, >> etc. Finally I have tracked it to this: >> >> TSimpleArrayString=obje

Re: [fpc-pascal] Problem with objects

2015-12-23 Thread Santiago A.
El 23/12/2015 a las 16:49, Dennis Poon escribió: > > > Even if it is an object, you can still define a constructor. > A constructor should initialize the memory area of the object to 0, > even if you don't explicitly assign List := nil; > It is safer to call this constructor before you handle the

Re: [fpc-pascal] Problem with objects

2015-12-23 Thread Santiago A.
El 23/12/2015 a las 16:24, Lukasz Sokol escribió: > On 23/12/15 09:37, Santiago Amposta wrote: > I might be wrong... but I just tried: > > ... What's the conclusion? As far as I see, there is some kind of bug. There is no reason for getting different results depending on how you

Re: [fpc-pascal] Problem with objects

2015-12-23 Thread Santiago A.
El 23/12/2015 a las 18:24, Jonas Maebe escribió: > Santiago Amposta wrote: > > > This is a bug in FPC 2.6.4 (it did not initialise managed fields of > parent objects for child objects that do not declare extra managed > fields). It is fixed in FPC 3.0. > I have used constru

[fpc-pascal] Problem with objects

2015-12-23 Thread Santiago Amposta
A:TSimpleArrayString; begin setLength(A.List,0); end; procedure TestDerived; var A:TDerivedArrayString; begin setLength(A.List,0); end; TestSimple; // Works Fine, TestDerived; // rises an exception SIGSEGV on setLength What am I doing wrong? -- Regards Santiago

Re: [fpc-pascal] specialize, identifier not found

2015-12-17 Thread Santiago A.
ng them as var parameters, but I thing it is a little cumbersome for setting fields. I will try using pointers. Thanks, it was driving me mad. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] specialize, identifier not found

2015-12-17 Thread Santiago A.
El 17/12/2015 a las 11:35, Sven Barth escribió: > > Am 17.12.2015 11:18 schrieb "Santiago A." <s...@ciberpiula.net > <mailto:s...@ciberpiula.net>>: > > I can live with no passing them as var parameters, but I thing it is a > > little cumbersome for

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread Santiago A.
El 16/12/2015 a las 17:57, Santiago A. escribió: > Which FPC version? Which language mode? Sorry, I have forgotten version. {$mode Delphi} FPC 2.6.4 Same result on Win XP 32bits and Linux Gtk 64bits -- Saludos Santiago A. ___ fpc-pascal maill

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread Santiago A.
El 16/12/2015 a las 17:25, Sven Barth escribió: > > Am 16.12.2015 16:12 schrieb "Santiago A." <s...@ciberpiula.net > <mailto:s...@ciberpiula.net>>: > > > > Type > > TRegAlias=record > >AliasName:string > > ... > >

[fpc-pascal] specialize, identifier not found

2015-12-16 Thread Santiago A.
but "identifier TARRAY" found Why this error? Why does the compiler try to look for a Identifier "specialize" instead of interpreting it as a reserved word? -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepas

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Santiago A.
El 16/12/2015 a las 11:55, Jonas Maebe escribió: > while with "out", they are first finalised Sorry, what does this mean? -- Saludos Santi s...@ciberpiula.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

  1   2   >