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

2018-04-18 Thread Alexander Grotewohl

IIRC I used these: http://gnuwin32.sourceforge.net/packages/openssl.htm

Not sure about the file naming, but just put the .dll files in the same 
directory as your executable. You'll know pretty quick if it works :)



On 04/18/2018 12:57 PM, Dennis wrote:
According to http://wiki.lazarus.freepascal.org/fphttpclient, I need 
the openssl library if I want to use fphttpclient for 
https://www.yahoo.com/


From the wiki, it went to https://wiki.openssl.org/index.php/Binaries 
for the binary dll but I tried the link https://indy.fulgan.com/SSL/  
in the wiki and it did not work.


Anyone with a successful experience can give me a direct url for the 
openssl dll?


By the way, for those zip files I tried, although they are named 
xxx-win64, the dll contained in them are named ssleay32.dll and 
libeay32.dll.

Is that normal for a win64 bit dll 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 maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2018-04-18 Thread Dennis
According to http://wiki.lazarus.freepascal.org/fphttpclient, I need the 
openssl library if I want to use fphttpclient for https://www.yahoo.com/


From the wiki, it went to https://wiki.openssl.org/index.php/Binaries 
for the binary dll but I tried the link https://indy.fulgan.com/SSL/  in 
the wiki and it did not work.


Anyone with a successful experience can give me a direct url for the 
openssl dll?


By the way, for those zip files I tried, although they are named 
xxx-win64, the dll contained in them are named ssleay32.dll and 
libeay32.dll.

Is that normal for a win64 bit dll to be named xxx32.dll?

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

Re: [fpc-pascal] Using constants instead of comments

2018-04-18 Thread Mark Morgan Lloyd

On 18/04/18 12:15, wkitt...@windstream.net wrote:
On 04/17/2018 11:06 PM, James Richters wrote:> I have a whole section of 
diagnostic writeln's in a program, and it's tedious to comment them all 
out/in as needed.   I'm curious if doing something like


what's wrong with traditional IFDEF?? use something like this...
{$IFDEF DEBUG}writeln ('blahblahblah');writeln 
(LOGFILE,'blahblahblah');flush (LOGFILE);{$ENDIF}


then you simply create the DEBUG define...
-DDEBUG
if you don't want it, leave it out and none of the bracketd code is even 
included...


I agree. Another possibility is something like

{$if declared(customDebugWrite) }
  customDebugWrite(...);
{$endif declared() }

so if customDebugWrite() isn't present in the program during compilation 
(commented out, or the entire unit containing it omitted) no attempt 
will be made to call it.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Using constants instead of comments

2018-04-18 Thread Vojtěch Čihák

Hi,
 
Why not define?
 
{$DEFINE DEBUG}
 
{$IFDEF DEBUG} Writeln('diagnostic info'); {$ENDIF}
 
V.
 
__

Od: "James Richters" 
Komu: "'FPC-Pascal users discussions'" 
Datum: 18.04.2018 05:06
Předmět: [fpc-pascal] Using constants instead of comments


I have a whole section of diagnostic writeln's in a program, and it's tedious 
to comment them all out/in as needed.   I'm curious if doing something like

Const 
  diagnosticdetail=false;


If diagnosticdetail then Writeln('diagnostic info');

Is the same as 


// Writeln('diagnostic info');

And the Writeln will actually end up being left out of the compiled program 
altogether... since the constant will never allow it to run,  or if not, is 
there a better way to optionally exclude diagnostic information entirely from 
the compiled program?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Using constants instead of comments

2018-04-18 Thread Giuliano Colla

Il 18/04/2018 05:06, James Richters ha scritto:

  is there a better way to optionally exclude diagnostic information entirely 
from the compiled program?


Did you consider to replace your Writeln with a DiagWrite (or whatever 
name you prefer),


and have a DiagWrite such as:

DiagWrite: Procedure(aMessage: string); inline;
begin
  if diagnosticdetail then Writeln(aMessage);
end;

This should do the job, and reduce your typing.

Giuliano
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal