Re: [fpc-pascal] What to do to get new users

2024-10-17 Thread Santiago A. via fpc-pascal
.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal They were trying to make know a new interesting product, not to resucite an almost dead language. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal

[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 A

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

2021-08-26 Thread Santiago A. via fpc-pascal
h 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? -- Sal

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

2021-01-12 Thread Santiago A. via fpc-pascal
o disable IPV6 service 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.freepasca

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

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

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, it

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
kes to get 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.
freepascal.org/docs-html/rtl/system/integer.html>; Thank you Zamrony P. Juhara https://v3.juhara.com https://github.com/zamronypj Fano Framework https://fanoframework.github.io mod_pascal https://zamronypj.github.io/mod_pascal On Wed, Apr 29, 2020 at 16:40, Santiago A. wrote: __

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

2020-04-29 Thread Santiago A.
Wednesday is "Mié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

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

2020-03-13 Thread Santiago A.
arbage, dangerous 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. _

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

2020-03-13 Thread Santiago A.
ike NIL for pointers or NaN for numbers or Nul in variants kind := tak_none Yeah. That is the way. -- Saludos Santiago A. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2020-03-13 Thread Santiago A.
ers end; 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.
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. --

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

2019-07-08 Thread Santiago A.
in complexity. Instead or using the standard 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 wor

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

2019-05-23 Thread Santiago A.
Target_File); End;     Until Filenum>=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 Santiag

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

2019-05-22 Thread Santiago A.
robably 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.
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.
is only for internal 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-pa

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 A

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

2018-12-19 Thread Santiago A.
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.
ger(1)); 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.
m, it creates am empty function and brings to front 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.

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 Currenc

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

2018-10-03 Thread Santiago A.
ions, no matter 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. _

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.
er like with strings? -- 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-22 Thread Santiago A.
sense, or other 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

Re: [fpc-pascal] Syntax changes suggestions

2018-07-17 Thread Santiago A.
ng depending on 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.
the grounds of a irrational resistance.  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.
interface, 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. --

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

2018-07-03 Thread Santiago A.
, closures, anonymous functions, concurrency, a clear use of character sets, different types of pointers. And there are things that I would change in the current syntax, but I suppose it is a matter of  taste. This is a topic for fpc-other ;-) -- Saludos Santiago A

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

2018-07-03 Thread Santiago A.
gling 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 -

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

2018-07-02 Thread Santiago A.
er, like it does in expressions. -- Saludos 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.
r to review  software to 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 ch

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

2018-03-14 Thread Santiago A.
r was too old and 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 maill

[fpc-pascal] Sqlite error sqlite3_extended_errcode SIGSDEV

2018-03-14 Thread Santiago A.
x27;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.freepa

Re: [fpc-pascal] Range checks

2018-01-29 Thread Santiago A.
qword( 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.
a compilers 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

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-21 Thread Santiago A.
ll precision. 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.
of any other way I 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. __

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

2017-07-21 Thread Santiago A.
he 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 procedure foo; procedure resetFoo; implementation var HiddenValue:

Re: [fpc-pascal] Convert to int64 note

2017-07-15 Thread Santiago A.
. In the conversion 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. M

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.
debug any field 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, b

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 > randomiz

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

2017-03-22 Thread Santiago A.
want security 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.
e the file. 3) Read 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 fl

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

2017-02-22 Thread Santiago A.
oblems with 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.o

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.
at do 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.
line is patented. Nevertheless, as someone 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. ___

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

2016-10-13 Thread Santiago A.
en in this 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.
ks survive 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.
gs questions about errors related 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 th

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 memo

Re: [fpc-pascal] LowerCase vs. UnicodeLowerCase

2016-10-11 Thread Santiago A.
ould be fixed. 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.
ctance is a matter 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.
nothing 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.fr

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 = &

[fpc-pascal] Asci85

2016-09-16 Thread Santiago A.
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 = <~0etOA Decode <~0etOA = 1234 Decode <~0etOA2)Y~> = 123456 -- It looks like decoder stops reading so

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.
tely or display 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@

Re: [fpc-pascal] Weird string behavior

2016-07-28 Thread Santiago A.
aware strings 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 t

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 behavio

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.
e with it. But I think that automatic change of var type is really wrong. 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.
252 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 _

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: 125

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. 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 "string", which is

[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 test

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

2016-07-13 Thread Santiago A.
e is not a recognizable symbol "_Password"), if I 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 i

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

2016-06-15 Thread Santiago A.
g as 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.
ed? ?? 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

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 language

[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 n

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

2016-04-07 Thread Santiago A.
ry to make it public) When you changed a macro it was like changing 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...

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, > - G

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.
or object 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 mai

Re: [fpc-pascal] Problem with objects

2015-12-23 Thread Santiago A.
,0); // If i comment this line, when I finish the program, the debug says there are unfreed blocks end; In TDerivedArrayString I need to manually set the length of the list to zero. If I don't, the memory is not freed, but in TSimpleArrayString it frees memory. Is it also a known bug of 2.6.4

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 L

Re: [fpc-pascal] Problem with objects

2015-12-23 Thread Santiago A.
w you execute two independent and isolated procedures or if you comment in or out an unused procedure. -- 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] 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=object >> List:array of String; >> end; >> >> TDerivedArrayStrin

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." <mailto:s...@ciberpiula.net>>: > > I can live with no passing them as var parameters, but I thing it is a > > little cumbersome for setting fields. I will try usin

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

2015-12-17 Thread Santiago A.
27;; myObject.reg:=auxReg; I can live with no passing 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-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." <mailto:s...@ciberpiula.net>>: > > > > Type > > TRegAlias=record > >AliasName:string > > ... > > end; > > > > T

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 http://lists.freepascal.org/cgi-

[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

  1   2   >