Re: [fpc-pascal] Legitimate use of for and break

2023-06-20 Thread Dennis Lee Bieber via fpc-pascal
On Tue, 20 Jun 2023 14:05:04 +0700, Hairy Pixels via fpc-pascal declaimed the following: > >Educators continuously have stupid ideas that don't work out as intended in >the real world. I would love to see them make a real program that does >something difficult and not use early breaks. > >I

Re: [fpc-pascal] Pause Key

2023-04-15 Thread Dennis Lee Bieber via fpc-pascal
On Sat, 15 Apr 2023 14:23:12 +0300, Nikolay Nikolov via fpc-pascal declaimed the following: >Actually, the Linux console (but not X11!) uses Scroll Lock to pause the >console output, pretty much the same way DOS and BIOS used the Pause >key. Why didn't Linus Torvalds use the Pause key is

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-03 Thread Dennis Lee Bieber via fpc-pascal
On Mon, 03 Apr 2023 20:55:43 +0200, Bo Berglund via fpc-pascal declaimed the following: >I just tested by writing four 0x00 bytes in a row, then verifying that the >memory read shows these, then writing other data and again verifying that the >data is there. > Which may only mean the

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-02 Thread Dennis Lee Bieber via fpc-pascal
On Sun, 02 Apr 2023 16:16:46 +0200, Bo Berglund via fpc-pascal declaimed the following: > > >Byte Write >a location within a 64 byte page. A byte following the >address bytes will be interpreted as data. The data will be

Re: [fpc-pascal] Lazarus 2.0.10 FPC 3.2.0 TFPHTTPClient no longer supports https

2020-08-05 Thread Dennis
Michael Van Canneyt wrote: On Wed, 5 Aug 2020, Dennis wrote: Michael Van Canneyt wrote: On Wed, 5 Aug 2020, Dennis wrote: After upgrading to Lazarus 2.0.10 FPC 3.2.0 , my existing code using TFPHTTPClient.Get('https://api.telegram.org/bot') returns the error "No SSL Socket su

Re: [fpc-pascal] Lazarus 2.0.10 FPC 3.2.0 TFPHTTPClient no longer supports https

2020-08-05 Thread Dennis
Michael Van Canneyt wrote: On Wed, 5 Aug 2020, Dennis wrote: After upgrading to Lazarus 2.0.10 FPC 3.2.0 , my existing code using TFPHTTPClient.Get('https://api.telegram.org/bot') returns the error "No SSL Socket support compiled in" How can I fix it? Simply add one of

[fpc-pascal] Lazarus 2.0.10 FPC 3.2.0 TFPHTTPClient no longer supports https

2020-08-04 Thread Dennis
After upgrading to Lazarus 2.0.10 FPC 3.2.0 , my existing code using TFPHTTPClient.Get('https://api.telegram.org/bot') returns the error "No SSL Socket support compiled in" How can I fix it? Dennis -- This email has been checked for viruses by AVG. https://w

Re: [fpc-pascal] Initial support for Custom Attributes

2019-07-13 Thread Dennis
if it took quite some time until it was finally integrated into trunk. Thanks for the contribution. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] why isn't the 'exit' in the finally end clause executed?

2019-06-24 Thread Dennis
it using regular expression ACROSS line breaks? That is, how to find the following in Lazarus IDE? finally    .    exit;    . end; Thanks in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org

[fpc-pascal] why isn't the 'exit' in the finally end clause executed?

2019-06-23 Thread Dennis
Before Exit');    exit;     end;     Writeln('after try finally block'); end; begin   Test; end. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] http://wiki.freepascal.org/ web site is totally blank

2019-06-07 Thread Dennis
DaWorm wrote: There was a thread yesterday about issues with the servers.  This may be related. Jeff On Thu, Jun 6, 2019 at 4:58 AM Dennis <mailto:de...@avidsoft.com.hk>> wrote: Does it only happen to me? The web site is still blank

[fpc-pascal] http://wiki.freepascal.org/ web site is totally blank

2019-06-06 Thread Dennis
Does it only happen to me? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] error in https://www.freepascal.org/docs-html/rtl/strutils/ansiindextext.htm

2019-05-08 Thread Dennis
is found, -1 is returned. The strings are matched ignoring case. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Dennis
Sven Barth via fpc-pascal wrote: Am 21.04.2019 um 18:22 schrieb Dennis: I am using FPC 3.0.4 Lazarus 2.00 on windows 64 I created a subclass of TThread and found out that the TThread.OnTerminate event was never called (I already assigned it). Also, I search the source code of TThread

[fpc-pascal] TThread.OnTerminate never called

2019-04-21 Thread Dennis
OnTerminate Is it supposed to be a dummy place holder? I don't use Delphi any more. Is this behaviour the same as Delphi? Thanks in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo

Re: [fpc-pascal] Web Server Written in Free Pascal?

2019-03-31 Thread Dennis
tools available in FPC. This is an area of very active development, the latest addition is a complete REST bridge for SQLDB. Can you share the link of REST bridge for SQLDB? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] how to make a type private to the unit but not defining it in the implementation section?

2019-03-07 Thread Dennis Poon
method declaration name   procedure _PrivateData.THidden.Method1;   begin   end; Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] how to make a type private to the unit but not defining it in the implementation section?

2019-03-07 Thread Dennis
be used by the field in the class declaration of TProxyServerFrame. if there a compiler directive that I can put around TMyStringGrid to make it only visible to the unit frproxyserver? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Anyone uses Synapse trunk version instead of the official 2012 release 40?

2019-02-25 Thread Dennis
. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] how to loadlibrary in a specific folder in windows 64?

2019-02-08 Thread Dennis
. Please help. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] when will the size of an enumerated type change?

2019-01-09 Thread Dennis
or in another unit file. Is that possible? I cannot create a simple test file to test it because the problem only  appears in my big project. Does FPC always produce a 4 byte variable for an enumerated types? Dennis ___ fpc-pascal maillist - fpc-pascal

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

2018-12-31 Thread Dennis
Just wondering whether the deceased's family requires any financial assistance? If yes, maybe we can throw a fund raiser. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc

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

2018-12-26 Thread Dennis
will definitely be missed by many. Our hearts and prayers go out to his family and friends. Rest in peace Martin Schreiber. Regards, Graeme That is horrible news. How can someone pass away so suddenly? So sad. My condolences to his friends and family. Dennis

[fpc-pascal] How to codesign my FPC program

2018-10-30 Thread Dennis
. https://codesigncert.com/cheapcodesigning I am totally new to this.  Can that USD75 certificate achieve my goal? After I get the certificate, do you need to use any special software to sign my exe? Seems like Visual Studio can do it but I am using Lazarus. Any feedback is welcome. Dennis

Re: [fpc-pascal] Cannot use SQLite 64 bit dll

2018-10-21 Thread Dennis
out it is not a 64 bit dll. How can I force SQLite3Connection to first look for the dll in the exe folder instead of from the search path? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman

[fpc-pascal] Cannot use SQLite 64 bit dll

2018-10-19 Thread Dennis
; However, the debugger did not stop at all at any of them. What could possibly be the cause of the problem? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] any free pascal standard function to compare a string against an array of string?

2018-10-10 Thread Dennis
is there a function like   if    IsOneOf('subtext', ['abc','cde','fecg','hig'])   then begin ... end; is there such a function IsOneOf(TheSubString : String; const TheStrings : array of String) : Boolean ? if yes, what is its name and unit? Dennis

Re: [fpc-pascal] Announcement GLPT

2018-09-26 Thread Dennis Poon
Darius Blaszyk wrote: On Tue, Sep 25, 2018 at 5:21 PM Dennis <mailto:de...@avidsoft.com.hk>> wrote: I tried it but found that drawing text in OpenGL seems to be problematic. Is there anyway to draw text using windows' existing font? Or is there a library for nic

Re: [fpc-pascal] Announcement GLPT

2018-09-25 Thread Dennis
Anthony Walter wrote: Dennis, If you want to embed OpenGL in your window, then there is already TOpenGLControl. It's included with Lazarus and is in the components folder. More here: Thanks a lot. I tried it but found that drawing text in OpenGL seems to be problematic. Is there anyway

Re: [fpc-pascal] Announcement GLPT

2018-09-25 Thread Dennis
Thanks for your contribution. Just tried out your sample, they are nice. How can I use opengl within my lazarus UI program? I want to embed such an opengl window inside a TPanel, and in its Paint method, do the opengl rendering. Is that possible?  How? Dennis

[fpc-pascal] How is interface variable implemented?

2018-08-24 Thread Dennis
on the web. Thanks for your answer in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-16 Thread Dennis Poon
Sven Barth via fpc-pascal wrote: Am 15.08.2018 um 10:59 schrieb Dennis: Why class operator is accepted for advanced records but not old fashion object??? Because objects are not records. Internally they are handled more closely to classes than records. Would it be too hard to also

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Dennis
Michael Van Canneyt wrote: On Wed, 15 Aug 2018, Dennis wrote: I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one. When I specialize a class using this TDictionary with a type: TSecurity = object   end

[fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Dennis
for my object. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Will moving from due core CPU to 6 Core CPU of the same clock speed improve the speed of FPC compiling?

2018-08-07 Thread Dennis Poon
: Compilation raised exception internally When that happens, I have to build the entire project, and that takes much longer. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Will moving from due core CPU to 6 Core CPU of the same clock speed improve the speed of FPC compiling?

2018-08-06 Thread Dennis
noticeable improvement in speed. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] No type info available for this type (Enumerated type with constant assignment)

2018-07-24 Thread Dennis Poon
Sven Barth via fpc-pascal wrote: Dennis mailto:de...@avidsoft.com.hk>> schrieb am Mo., 23. Juli 2018, 12:24: Is this kind of enumerated type with constant assignment not supported by FPC 3.0.4?    TMonthType = (January=1, February, May=5,June, July); The enumeratio

[fpc-pascal] No type info available for this type (Enumerated type with constant assignment)

2018-07-23 Thread Dennis
ln(i.ToSTring+' -> '+s);     end;   readln; end. However, if I change to   TMonthType = (January, February, May,June, July); The compiler error will disappear. Is this kind of enumerated type with constant assignment not supported by FPC 3.0.4?   TMonthType = (January=1, February, May=5,June

Re: [fpc-pascal] How to translate Delphi Assembly MOV EAX,[EBP+4]

2018-07-18 Thread Dennis
Thanks. So the following will give an address+frame of the calling routine ?     get_caller_addr(get_frame),  get_caller_frame(get_frame) Dennis Sven Barth via fpc-pascal wrote: Dennis mailto:de...@avidsoft.com.hk>> schrieb am Mi., 18. Juli 2018, 17:19: The following delphi cod

[fpc-pascal] How to translate Delphi Assembly MOV EAX,[EBP+4]

2018-07-18 Thread Dennis
The following delphi code when compiled by FPC, raised these errors: Compile Project, Target: lib\x86_64-win64\Project1.exe: Exit code 1, Errors: 10, Warnings: 2 StrBuffer.pas(100,19) Error: Unknown identifier "EAX" StrBuffer.pas(100,23) Error: Assembler syntax error in operand

[fpc-pascal] How to use Google Protocol Buffer

2018-07-09 Thread Dennis
, when called with the Buf generated by pbEncodeDataRequestRecord will raise exception "Invalid buffer " Any help? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] List of chars for case

2018-07-02 Thread Dennis
, Ryan Joseph   case c of '[', ']', '(', ')', '{', '}', '=', ':' : result := true;   end; Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Realtime and freepascal???

2018-05-31 Thread Dennis
lower latency and lower RAM requirement than running your FPC program on top of the Linux OS. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Stack alias for ARC like memory management?

2018-04-25 Thread Dennis
of statistics in R.   People new to iOS will learn swift because it allows them easily call all the libraries of iOS, not because swift is better than Pascal or Java. It is about convenience. Dennis ___ fpc-pascal maillist - fpc-pascal

[fpc-pascal] Where to download OpenSSL (for windows 64 bit) that is used by fphttpclient

2018-04-18 Thread Dennis
to be named xxx32.dll? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] C header to Pascal , what is the type of ENUM?

2018-02-23 Thread Dennis
should translate to Integer or Int64 in Pascal. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-02 Thread Dennis Poon
Sven Barth via fpc-pascal wrote: Am 02.02.2018 17:53 schrieb "Dennis" <de...@avidsoft.com.hk <mailto:de...@avidsoft.com.hk>>: I have list of objects which contains references to other objects. I need to save all these objects to harddisk to be restored on a

[fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-02 Thread Dennis
e.g. OnClick, OnClose etc. How do I save and restore them from file? Many thanks in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] RunError(215) occurs only in win 64 bit, not win 32 bit

2018-01-24 Thread Dennis
should be fixed. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] RunError(215) occurs only in win 64 bit, not win 32 bit

2018-01-24 Thread Dennis
When I compiled the following simply programs using Lazarus 1.8 fpc 3.0.4 Win 64, run it, it will throws RunError(215) Arithmetic overflow error. However, if I compile and run the same in Lazarus 1.8 fpc 3.0.4 win 32, it won't raise the RunError (215). Why??? program test64bit; {$mode

[fpc-pascal] can inherited simply replace inherited method(param1, param2, param3)?

2018-01-11 Thread Dennis
are the 2 below equivalent? procedure Method(param1, param2 : integer); begin inherited; end; procedure Method(param1, param2 : integer); begin inherited Method(param1, param2); end; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

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

2018-01-03 Thread Dennis Poon
Santiago A. wrote: 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 Thanks for the reminder. I forgot about it. Dennis ___ fpc-pascal

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

2018-01-03 Thread Dennis
I have a list of records (each with a few fields). I want to let users display this list of records in ascending orders of any record field. Is there any existing units/library I can use? Thanks in advance. Dennis ___ fpc-pascal maillist - fpc

[fpc-pascal] Why win64 program are considerably bigger in exe size than win 32?

2017-12-22 Thread Dennis
I am upgrading my program from win 32 to win 64 using the new Lazarus 1.8. I discovered my program exe size increased from 6M to 9M. Why? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman

Re: [fpc-pascal] Cannot find entry point of a routine inside a windows 64 dll

2017-12-17 Thread Dennis
Sven Barth via fpc-pascal wrote: On 15.12.2017 16:10, Dennis wrote: Okay, that explains things a bit more. May I ask you to provide a small example consisting of program and library (source only) that works in 32-bit, but fails in 64-bit? Try way I can check myself what is going on as I have

Re: [fpc-pascal] Cannot find entry point of a routine inside a windows 64 dll

2017-12-13 Thread Dennis
Sven Barth via fpc-pascal wrote: Am 13.12.2017 11:39 schrieb "Dennis Poon" <den...@avidsoft.com.hk <mailto:den...@avidsoft.com.hk>>: Just for clarification: is the excel_xp.dll written by you or by a 3rd party? Or are you talking about a different library wr

Re: [fpc-pascal] Cannot find entry point of a routine inside a windows 64 dll

2017-12-13 Thread Dennis Poon
Sven Barth via fpc-pascal wrote: Am 13.12.2017 03:04 schrieb "Dennis" <de...@avidsoft.com.hk <mailto:de...@avidsoft.com.hk>>: I am converting my windows 32 program to 64 bit. It compiled with lazarus without any problem.(fpc 3.0.2) I also compile the dll t

[fpc-pascal] Cannot find entry point of a routine inside a windows 64 dll

2017-12-12 Thread Dennis
e dll file name) In the routine of the dll, there is an out parameter of type WideString, could this be the problem? If not, what else could be the cause of the problem? Below is the calling program: Dennis - const ExcelDLLName = 'Excel_xp.dll';//1.90951 Type TFileNameString =

Re: [fpc-pascal] Is there any pascal interface to TensorFlow or other neural network tools?

2017-12-07 Thread Dennis Poon
etwork layers (convolution, maxpool, concat, full connect, local connect, ...) on 1D, 2D and 3D plus initialization functions (uniform, Glorot, He, LeCun). Although the OpenCL implementation is still cooking, the AVX implementation rocks. Thanks. Dennis __

Re: [fpc-pascal] Lazarus Release 1.8

2017-12-07 Thread Dennis
Mattias Gaertner wrote: The Lazarus team is glad to announce the release of Lazarus 1.8. The release was built with FPC 3.0.4. The previous release Lazarus 1.6.4 was built with FPC 3.0.2. Congratulations and thank you for your great work. Dennis

Re: [fpc-pascal] Is there any pascal interface to TensorFlow or other neural network tools?

2017-10-29 Thread Dennis Poon
Michael Van Canneyt wrote: On Sat, 28 Oct 2017, Dennis wrote: or even neural network libraries written in Pascal? I know there are many python interfaces/libraries but I hope to use Pascal entirely so that I don't have to run a python server along side my Free Pascal program

[fpc-pascal] Is there any pascal interface to TensorFlow or other neural network tools?

2017-10-28 Thread Dennis
case, I have to write python tcp/ip server to accepts commands from (and send back results to ) my FPC program. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] how to get a list of all thread id

2017-10-05 Thread Dennis
running thread ids after Application.Run, I might find out what those 2 threads are. Can I do that in windows 32-bit? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to call C++ function with Vector

2017-09-26 Thread Dennis Poon
think I will follow your advice. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] How to call C++ function with Vector

2017-09-26 Thread Dennis
rray of SPApiProduct; function SPAPI_GetProduct(var apiProdList : TSPApiProduct);stdcall; Thanks a lot in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Is it always safe to typecast a old style object as its parent?

2017-08-01 Thread Dennis
TParent = object A : integer; end; TChild=object(TParent) B : integer; end; var Parent : TParent; Child : TChild; begin Child.A := 10; Child.B := 20; Parent := TParent(Child );// is this always safe ? Will it copy ONLY the 'A' field to 'parent'? Will it

Re: [fpc-pascal] why the 0.5 in the Unix Epoch (for UnixToDateTime function)

2017-08-01 Thread Dennis Poon
Vojtěch Čihák wrote: Hi, wiki https://en.wikipedia.org/wiki/Julian_day says that "... Julian day number 0 assigned to the day starting at noon on January 1, 4713 BC, ..." The noon means 0,5. Thanks, that is a weird definition though IMH

Re: [fpc-pascal] Why casting interface as Tobject will result in a different reference?

2017-05-27 Thread Dennis Poon
Sven Barth via fpc-pascal wrote: The idea itself is valid, cause "(IMyInterfaceVar as TObject) as IMyInterface = IMyInterfaceVar" is true if and only if IMyInterface is a COM interface. If IMyInterface really is a CORBA interface as Dennis wrote then the compiler should already have

[fpc-pascal] Why casting interface as Tobject will result in a different reference?

2017-05-26 Thread Dennis
previous writeln //This is causing a problem to me because I later MyList.Remove(aObj as IMyInterface);//will fail because it is not the same as aInt and thus fail to locate the item to remove Am I missing some fundamental understanding of interface reference? Dennis

[fpc-pascal] GUI multithreaded Win32 program sometimes freeze when quitting

2017-04-18 Thread Dennis
all when some common units are changed by another project. Since this freezing behavour does not happen during debugging, I have spent months trying to fix it but failed. Any suggestions are welcome. Dennis ___ fpc-pascal maillist - fpc-pascal

[fpc-pascal] how to determine if a class has descendant registered within the current program

2017-03-08 Thread Dennis
'; end; where HasChild is a boolean class function that tells me whether the current calling class has children defined or now. Is that possible? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin

Re: [fpc-pascal] Run Time Type Info - are the type names of all classes defined in a unit stored in the RTTI?

2017-03-01 Thread Dennis Poon
Sven Barth wrote: Am 01.03.2017 11:53 schrieb "Dennis" <de...@avidsoft.com.hk <mailto:de...@avidsoft.com.hk>>: > > Programmatically, I want to make a list of all Classes defined in the unit. > Is this info stored in the RTTI or anywhere else?

[fpc-pascal] Run Time Type Info - are the type names of all classes defined in a unit stored in the RTTI?

2017-03-01 Thread Dennis
Programmatically, I want to make a list of all Classes defined in the unit. Is this info stored in the RTTI or anywhere else? Thanks in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin

Re: [fpc-pascal] how to use Default to replace this ' FillChar(aRecord, sizeof(aRecord), 0);

2016-12-05 Thread Dennis Poon
). Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to use Default to replace this " FillChar(aRecord, sizeof(aRecord), 0);

2016-12-05 Thread Dennis Poon
Sven Barth wrote: Am 05.12.2016 08:24 schrieb "Dennis" <de...@avidsoft.com.hk <mailto:de...@avidsoft.com.hk>>: > > In this old statement, I don't need to know the type of aRecord > but if I want to use Default, I have to know the exact type of the varaible

[fpc-pascal] how to use Default to replace this " FillChar(aRecord, sizeof(aRecord), 0);

2016-12-04 Thread Dennis
without knowing the variable type? (it is because sometimes the type get renamed) Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] can a class implement both a CORBA interface and an COM interface at the same time?

2016-11-17 Thread Dennis
Dennis wrote: I have a class implementing a Com interface. Now I want it to also implement a CORBA interface. Is it dangerous? For other who might be interested in this issue. I have tested it for a while and it does not seem to cause any problems. Dennis

[fpc-pascal] can a class implement both a CORBA interface and an COM interface at the same time?

2016-11-16 Thread Dennis
I have a class implementing a Com interface. Now I want it to also implement a CORBA interface. Is it dangerous? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] TMS Aurelius Free today

2016-11-10 Thread Dennis
From Facebook, I just found this ORM became FREE today. http://www.tmssoftware.com/site/aureliusfree.asp I don't know whether it is better than mormot but might just download first. Anyone has experience in both can comment? Dennis ___ fpc-pascal

[fpc-pascal] Does FPC has anything like TCriticalSection.Acquire with timeout?

2016-11-02 Thread Dennis
If a CriticalSection can acquire (but with a timeout), it can avoid any gridlock. I googled and Delphi seems to have function which does time out function MonitorEnter(const AObject: TObject; Timeout: Cardinal = INFINITE): Boolean; How can I do the same in FPC? Dennis

Re: [fpc-pascal] what is the possible cause of EPrivilege Privileged instruction ?

2016-10-26 Thread Dennis Poon
thread loop through the task queue. The exception was raised within one of the many tasks in the task queue. Dennis On Oct 26, 2016 10:58 AM, "Dennis" <de...@avidsoft.com.hk <mailto:de...@avidsoft.com.hk>> wrote: I have a multi threaded program which executes a list of

[fpc-pascal] what is the possible cause of EPrivilege Privileged instruction ?

2016-10-26 Thread Dennis
: EPrivilegePrivileged instruction What could possibly raise this exception? My program is win 32 from Lazarus 1.7 FPC 3.1.1 and running on Win 7 64 bit. thanks in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-23 Thread Dennis
wkitt...@windstream.net wrote: On 08/23/2016 11:40 AM, Dennis wrote: Thanks a lot. I wonder if there is any catch. you mean like having to create an account, having to provide a phone number or having to run it in a winwhatever environment? ;) \ it says: "a limited commercial use li

Re: [fpc-pascal] Free Delphi 10.1 Berlin Starter Edition

2016-08-23 Thread Dennis
wonder if there is any catch. Anyway, I gave up Delphi after Delphi 5 and stick to FPC since then. However, from time to time, I miss its lightning fast compiler and good debugger. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

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

2016-07-13 Thread Dennis Poon
but no more unsecured than other simple solutions. UPX is at http://portableapps.com/apps/utilities/free_upx_portable The original sourceforge.net link is dead, I don't know why. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] Surprise. Comparison of method is only done on the routine address

2016-07-12 Thread Dennis Poon
Michael Van Canneyt wrote: On Tue, 12 Jul 2016, Dennis wrote: I always thought comparison of methods is done on both the data and the code part. TMethod = record Code : CodePointer; Data : Pointer; end; But the following proves it is NOT. What is the rationale

[fpc-pascal] Surprise. Comparison of method is only done on the routine address

2016-07-12 Thread Dennis
I always thought comparison of methods is done on both the data and the code part. TMethod = record Code : CodePointer; Data : Pointer; end; But the following proves it is NOT. What is the rationale behind such behavior? -- program compare_events;

Re: [fpc-pascal] can the compiler zero any out parameter of procedure/function automatically?

2016-07-11 Thread Dennis Poon
Jonas Maebe wrote: Dennis wrote: I know it is my responsibility to initialize out parameters, but I think the compiler could help us by initializing all out parameters. The compiler will fill out-parameters with garbage if you use the -gt command line parameter, which can help you detect

[fpc-pascal] can the compiler zero any out parameter of procedure/function automatically?

2016-07-11 Thread Dennis
us by initializing all out parameters. Am I the only one with this view? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] what is the correct way to write {$IFDEF FPC Version > 3.0}

2016-07-08 Thread Dennis Poon
Bart wrote: On 7/8/16, Dennis <de...@avidsoft.com.hk> wrote: what is the correct way to write {$IFDEF FPC Version > 3.0} See answers above. For your information: FPC_FULLVERSION construction: Major*1 + Minor*100 + Revision Thank you all for your answers

[fpc-pascal] what is the correct way to write {$IFDEF FPC Version > 3.0}

2016-07-08 Thread Dennis
what is the correct way to write {$IFDEF FPC Version > 3.0} Thanks in advance, Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is there a reactive framework for Free Pascal?

2016-07-07 Thread Dennis Poon
Sven Barth wrote: Am 07.07.2016 10:13 schrieb "Graeme Geldenhuys" <mailingli...@geldenhuys.co.uk <mailto:mailingli...@geldenhuys.co.uk>>: > > Hi Dennis, > > Would you mind explaining what is a “reactive framework”? http://reactivex.io/ Once we support he

[fpc-pascal] Is there a reactive framework for Free Pascal?

2016-07-05 Thread Dennis
Is there something like Rx.net for Free Pascal? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] What is the difference between TThread.Queue(aMethod: TThreadMethod) and Application.QueueAsyncCall(AMethod: TDataEvent; Data: PtrInt);

2016-07-01 Thread Dennis
find the interface parts of TThread classesh.inc Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Bls: Bls: Quick Modern Object Pascal Introduction, for Programmers

2016-06-22 Thread Dennis Poon
? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] why (ClassType as TMyClass).Create fails

2016-06-21 Thread Dennis
:= TMyClassRef(ClassType).Create(AOwner); Am I missing something? Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Quick Modern Object Pascal Introduction, for Programmers

2016-06-21 Thread Dennis Poon
gnTo.| |I am worried, choosing the wrong method to override will produce unexpected result.| || |Dennis| || | | ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] What is the difference between case else and case otherwise

2016-06-20 Thread Dennis
There is no details on http://www.freepascal.org/docs-html/ref/refsu57.html Thanks in advance. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Quick Modern Object Pascal Introduction, for Programmers

2016-06-19 Thread Dennis Poon
May I suggest the addition of : 1) user defined operator? 2) use of ClassType function for cloning objects Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Quick Modern Object Pascal Introduction, for Programmers

2016-06-19 Thread Dennis Poon
/modern_pascal_introduction/modern_pascal_introduction.pdf Good work and thank you for your contribution to the community. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

  1   2   3   >