Re: [fpc-pascal] Porting from Turbo Pascal to FPC

2020-04-30 Thread Alexander Grotewohl
it through..) -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Francisco Glover via fpc-pascal Sent: Wednesday, April 29, 2020 4:42 AM To: fpc-pascal@lists.freepascal.org Cc: Francisco Glover Subject: [fpc-pascal] Porting from Turbo Pascal to FPC

Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Alexander Grotewohl
procvar:=@proc_bool; ? -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Rainer Stratmann Sent: Tuesday, May 5, 2020, 4:05 PM To: FPC-Pascal users discussions Subject: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Alexander Grotewohl
my original suggestion and then function proc_bool : boolean; what exactly are you trying to accomplish? -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Rainer Stratmann Sent: Tuesday, May 5, 2020 4:20:11 PM To: FPC-Pascal users

Re: [fpc-pascal] How to implement a simple tcp/ip connection?

2020-05-14 Thread Alexander Grotewohl
the sockets unit should work exactly like any tutorial for c sockets for linux. a handful of the functuons need an fp prefix but should work mostly the same. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Giuliano Colla Sent

Re: [fpc-pascal] How to implement a simple tcp/ip connection?

2020-05-19 Thread Alexander Grotewohl
It was added for Linux 3.9 in 2013.. maybe the code predates that? -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Michael Van Canneyt Sent: Tuesday, May 19, 2020 12:57:37 PM To: FPC-Pascal users discussions Cc: bo.bergl...@gmail.com

Re: [fpc-pascal] Copying a Pchar to an array of bytes

2020-05-19 Thread Alexander Grotewohl
I believe pchar has special treatment where pchar[i] is the same as pchar^[i] do move(Hello^, ... -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Giuliano Colla Sent: Tuesday, May 19, 2020 1:05:54 PM To: FPC-Pascal users discussions

Re: [fpc-pascal] Writeln() behaves differently on Windows and Linux, why?

2020-07-09 Thread Alexander Grotewohl
perhaps try 'reset' or 'stty sane' in the terminal before running your program? are you using the crt or video units at all? it sounds like your terminal has gotten fudged somehow -- Alexander Grotewohl https://dcclost.com From: fpc-pas

[fpc-pascal] Newbie, Delphi porting: Which are standard Units?

2007-08-10 Thread Alexander v. Below
Hello, sorry for asking such a total newbie question, but I have some (apparently) Delphi code and I my goal is to examine if it is feasible to port this to Mac OS X. Now, it lists a lot of units, and google is not very helpful. So my question is: Are these standard Delphi units? Third pa

[fpc-pascal] N00b: Where is TRect?

2007-10-18 Thread Alexander von Below
Hello, sorry for another newbie question: I am trying to find TRect, but fpc can not find any of the Units GraphTypes, Graphics or Controls, which I found listed here:http://wiki.lazarus.freepascal.org/Code_Conversion_Guide/de#Wichtige_Unit_Unterschiede_zwischen_Lazarus_und_Delphi The error

Re: [fpc-pascal] N00b: Where is TRect?

2007-10-18 Thread Alexander von Below
Thanks for your reply. The mailing list is so slow that it taught me how to find it myself ;) Alex Am 18.10.2007 um 13:18 schrieb Graeme Geldenhuys: TRect is defined in the 'types' unit which is part of Free Pascal's RTL. Graeme. On 16/10/2007, Alexander von Below &l

Re: [fpc-pascal] N00b: Where is TRect?

2007-10-18 Thread Alexander von Below
Argh! Sorry about that, my bad! Alex Am 18.10.2007 um 14:08 schrieb Jonas Maebe: The reason it took so long for your message to appear was because it was an HTML message. All HTML messages are held for moderator approval to prevent virus and spam messages (with the address of a subscribe

[fpc-pascal] Working Free Pascal android JNI example

2010-06-27 Thread Benjamin Jan Alexander Rosseaux
Hello, I've done a working Free Pascal android JNI example (with working .apk for current ARM-based Android device of the second device generation (because with VFPv3, so Motorola Droid/Milestone, HTC Desire, Nexus One, Samsung Galaxy S, and so on) inside) http://vserver.rosseaux.net/stuff/

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-07-02 Thread Benjamin Jan Alexander Rosseaux
Am 02.07.2010 02:11, schrieb Reimar Grabowski: From your mail it is not clear which ld and as you used. I just took them from the Android NDK, you too? Unfortunately I currently have no time to play around with your code, but I will as soon as I can. Under linux I'm using self-built arm bin

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-11-24 Thread Benjamin Jan Alexander Rosseaux
Because maybe requested of few, here is the complete source code of the android version of my BeRoXM mod/xm/wow player (which is also in the android market), where the mod/xm/wow playerengine is implemented in object pascal and compiled with freepascal, and the UI part stuff is in Java. The

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-12-01 Thread Benjamin Jan Alexander Rosseaux
You do need for BeRoXM a current midclass/highend android device with a ARM CPU, which supports the ARM v7a instruction set or better said the VFPv3 floatingpoint instruction set. The SoC in the Wildfire, which is a lowend android device, is still ARMv6, like the HTC Dream and Magic. Because

Re: [fpc-pascal] Working Free Pascal android JNI example

2010-12-01 Thread Benjamin Jan Alexander Rosseaux
The pascal part is under the jni/ folder in the ZIP. Am 30.11.2010 11:32, schrieb Felipe Monteiro de Carvalho: Hello, How do you compile BeRoXM? Using ant? Also, installing BeRoXM.apk failed in HTC Wildfire Android 2.1 Also, I couldn't find the source code for the Pascal part. thanks,

Re: [fpc-pascal] Pascal Scripting Engines

2010-12-13 Thread Benjamin Jan Alexander Rosseaux
You can also have a look to BESEN http://besen.sourceforge.net/ which is a full ECMAscript 5th Edition (a ka JavaScript) standard compliant scripting engine, which is developed by me. It has even a JIT for x86 & x64. Am 10.12.2010 20:18, schrieb Andrew Brunner: Hi there, I'm considering pas

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Alexander Shishkin via fpc-pascal
06.11.2018 10:13, Ryan Joseph пишет: program generic_constants; type generic TList = record list: array[0..U-1] of T; function capacity: integer; end; I`d like to see constant parameter to be constrained with type type generic TList =

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Alexander Shishkin via fpc-pascal
var data: array[0..U] of T; end; generic TList4 = class var data: array[0..U] of T; end; 03.01.2019 2:15, Sven Barth via fpc-pascal пишет: Am Mi., 2. Jan. 2019, 23:41 hat Alexander Shishkin via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>> geschrieben: 06.11.

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Alexander Shishkin via fpc-pascal
03.01.2019 4:29, Ryan Joseph пишет: type generic TMyRecord_Int = record end; This is not consistent with constraints. Should be ";" after T. And what about following examples? type generic TMyRecord1 = record end; type generic TMyRecord2 = record

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Alexander Shishkin via fpc-pascal
03.01.2019 6:32, Ryan Joseph пишет: On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal wrote: This is not consistent with constraints. Should be ";" after T. And what about following examples? The semicolon is only needed following a generic parameter which is c

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Alexander Shishkin via fpc-pascal
03.01.2019 15:45, Mattias Gaertner via fpc-pascal пишет: On Thu, 3 Jan 2019 14:58:00 +0300 Alexander Shishkin via fpc-pascal wrote: [...] This is OK (both T and U are integer): generic TMyRecord1 = record end; That is inconsistent to normal Pascal arguments. Name[, Name ...][:type] Isn&#

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

2020-10-06 Thread Alexander Grotewohl via fpc-pascal
Not 100% on this but I think the gist is that UnicodeString is compatible with AnsiString and a conversion is done on assignment. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Ryan Joseph via fpc-pascal Sent: Tuesday, October 6

Re: [fpc-pascal] fpmmap problem 64 bit linux

2020-11-20 Thread Alexander Grotewohl via fpc-pascal
listed in the fpmmap docs you posted. My guess is the easiest answer is "distribute both 32 and 64 bit versions," but that doesn't help when you need to test the 32 bit one.. -- Alexander Grotewohl https://dcclost.com -- Alexander Grotewohl https://dcclost.com _

Re: [fpc-pascal] Two versions of freemem() - are they equal

2020-12-30 Thread Alexander Grotewohl via fpc-pascal
seful using freemem like above would be.. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Marco van de Voort via fpc-pascal Sent: Wednesday, December 30, 2020 5:56:45 PM To: FPC-Pascal users discussions Cc: Marco van de Voort Subject: Re:

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread Alexander Grotewohl via fpc-pascal
Your FN:=''; is clobbering the pointer 'FN' with nonsense. Just leave that line out, it isn't necessary. Or do like FN^:=#0; if you want C-string like functions to report zero length.. -- Alexander Grotewohl https://dcclost.com From:

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread Alexander Grotewohl via fpc-pascal
The memory for FN is allocated at the top with StrAlloc() -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Martin Frb via fpc-pascal Sent: Wednesday, December 30, 2020 8:00 PM To: fpc-pascal@lists.freepascal.org Cc: Martin Frb Subject

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread Alexander Grotewohl via fpc-pascal
yes, this type of thing is why we use Pascal. pchar is your little bucket of ram that FPC in a sense knows nothing about. set it to #0 and pray for the best, cause that's what you do.. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on beha

[fpc-pascal] Windows Defender considers fp.exe a malicious program

2021-02-12 Thread Alexander Bunakov via fpc-pascal
, Alexander ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Windows Defender considers fp.exe a malicious program

2021-02-12 Thread Alexander Grotewohl via fpc-pascal
Unfortunately from what I've read just using certain Windows APIs is enough to get an executable flagged. Probably nothing to be too concerned about. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Alexander Bunakov via fpc-p

Re: [fpc-pascal] compiling on command line linux

2021-02-15 Thread Alexander Grotewohl via fpc-pascal
There's a command line parameter.. try something like fpc -FU~/.units.lnx yourapp.pp Of course you would have to remember to do that for EVERY compile (I set my text editor to do it) but you could probably add it to your fpc.cfg too. -- Alexander Grotewohl https://dcclos

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-18 Thread Alexander Grotewohl via fpc-pascal
if it's waiting on keyboard input you might be better off using select() for that instead of looping and checking for keyboard input each go around. sleep() might already do something similar with a zero timeout but even that would probably be insufficient -- Alexander Grotewohl

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-18 Thread Alexander Grotewohl via fpc-pascal
https://www.freepascal.org/docs-html/rtl/baseunix/fpsigtimedwait.html there we go :) i think this should do the trick. might need to rearrange some things though.. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Bo Berglund via fpc

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-18 Thread Alexander Grotewohl via fpc-pascal
that the dir is greater than 512 and allocate a bigger buffer as needed. So maybe dynamically allocating the space would be better. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of James Richters via fpc-pascal Sent: Friday, June 18, 2021 1

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-21 Thread Alexander Grotewohl via fpc-pascal
like again. This is important because almost everything you do with the Windows API will be some variant of this procedure and you need to be able to repeat this every time you use it without bugs 🙂 -- Alexander Grotewohl https://dcclost.com From: fpc-pascal

Re: [fpc-pascal] My Linux service application consumes 10% CPU when idling - why?

2021-10-24 Thread Alexander Grotewohl via fpc-pascal
OP if I'm assuming a lot but my guess is the code is a bit old and could use some refactoring to do away with the old Pascal "active loop." -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Bernd K. via fpc-pascal Sent: Saturday,

Re: [fpc-pascal] String error on Windows

2021-10-30 Thread Alexander Grotewohl via fpc-pascal
Because += is a mistake and hopefully it's irreparably broken. Does using just s:=s+';'; work? -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Hairy Pixels via fpc-pascal Sent: Saturday, October 30, 2021 11:09:49 PM

Re: [fpc-pascal] Text Only printing on Windows.

2022-02-09 Thread Alexander Grotewohl via fpc-pascal
ns and get them working right, but afterward you should have printing sorted for yourself as long as the windows api is supported. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of James Richters via fpc-pascal Sent: Wednesday, February 9,

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread Alexander Grotewohl via fpc-pascal
I've only ever done this like: pcmd: string; pcmd:='open "'+filename+'" ... '+#0; mciSendString(@pcmd[1], ...); mciSendString does return errors.. duno if that'll be helpful. I originally used it in Virtual Pascal and had to make a partial header myself so the FreePascal one might take parame

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread Alexander Hofmann via fpc-pascal
Hi, I'm not so sure if that's an FPC-only issue. MCI commands like that have been around for a while, so spaces might not have been "considered" in the first place. A workaround was presented years ago, I can only find the archived version: https://ftp.zx.net.nz/pub/archive/ftp.microsoft.com/M

<    1   2