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
, 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, 2022 1:17 PM
To: 'FPC-Pascal users
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
To: FPC-Pascal
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, October 23, 20
.
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 on behalf of James
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:56 PM
To: 'FPC
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
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
https
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://dcclost.com
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-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 behalf
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
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: fpc-pascal on behalf
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: [fpc
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
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
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-pascal on behalf of Bo
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
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
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
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
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
..)
--
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
Overt
o print:
= 2020
--
Alexander Grotewohl
https://dcclost.com
From: Zamrony P. Juhara
Sent: Tuesday, April 28, 2020 10:44:07 PM
To: FPC-Pascal users discussions ; Alexander
Grotewohl ; FPC-Pascal Users Discussions
Subject: Re: [fpc-pascal] Converting http da
Can't test, but from the docs shouldn't it be something like:
adateTime := ScanDateTime(
'ddd, dd mmm hh:mm:ss GMT',
'Wed, 29 Apr 2020 10:35:50 GMT');
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of Zamrony
P. Juhara via fpc
This is an evil travesty and I'm not happy about it:
-Fu$_$/../../lib/fpc/$fpcversion/units/$fpctarget
-Fu$_$/../../lib/fpc/$fpcversion/units/$fpctarget/*
-Fu$_$/../../lib/fpc/$fpcversion/units/$fpctarget/rtl
--
Alexander Grotewohl
https://dcclost.com
From: fpc
a correct
config to .fpc.cfg in their home directory... in that case they can at least
upgrade fpc independently from the whole project. But that touches the system..
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of fredvs
via fpc-pa
that asks for the prefix. Your
users should be capable of that?
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of fredvs
via fpc-pascal
Sent: Saturday, April 11, 2020 8:07:17 AM
To: fpc-pascal@lists.freepascal.org
Cc: fredvs
Subject
my guess is that function of wine is unimplemented (pretends to work but does
nothing)
try to see if you can fix the cause of the second error? does wine handle
relative paths gracefully?
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf
you're
programming and the first execution requires the drive to spin up again.
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of Marco
van de Voort
Sent: Tuesday, March 31, 2020 5:21:14 PM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc
perhaps calculate those results by hand and assign them.. then fix it later?
hehe
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of fredvs
via fpc-pascal
Sent: Tuesday, March 24, 2020 1:53:19 PM
To: fpc-pascal@lists.freepascal.org
Cc
just to be clear.. you did do foldhiddenbit: byte = 7, etc?
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of fredvs
via fpc-pascal
Sent: Tuesday, March 24, 2020 12:22:10 PM
To: fpc-pascal@lists.freepascal.org
Cc: fredvs
Subject: Re
Yes, those constants are defaulting to integer, which can represent both
negative and positive values. When you do your shl you're inadvertently causing
them to go into the range that pascal thinks is negative.
The typed constant should fix it.
--
Alexander Grotewohl
https://dcclost.com
Not that I'm anyone special but I and many others who lurk for the most part
would probably just lose track of the project.
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of Michael
Van Canneyt
Sent: Sunday, March 15, 2020 1:09:22 PM
tbh this list is off topic so very infrequently.. it's nice to see some "life"
out there beyond our compilers :)
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of
wkitt...@windstream.net
Sent: Friday, March 6, 2020 1:46:44
I sent this direct to him on accident but I don't think it worked
anyways (bounced?)
Just some test code so not very pretty. It works, but IN6ADDR_ANY was
missing and I'm not familiar enough with ipv6 to know how it might be
defined in other languages.
uses sockets;
const
IN6ADDR_ANY:
Returns true if it's a leap year according to source.--Alexander Grotewohlhttp://dcclost.comOn Oct 14, 2019 4:36 PM, Ched wrote:Hello All,
I'm wondering why DecodeDate is a procedure and DecodeDateFully a function in SysUtils... And there is no
description of the returned Boolean.
but the resolution is not a ms at all. every call to gettickcount is something like 10-15ms or so off. you'd be lucky to call it a ms after it was updated by the os. do we document that too?--Alexander Grotewohlhttp://dcclost.comOn Sep 7, 2019 7:41 PM, Martin Frb wrote:On 07/09/2019 21:42, Zoe
d.x += 10; // makes even more sense
On 8/11/2019 2:21 PM, Ryan Joseph wrote:
On Aug 11, 2019, at 11:41 AM, Sven Barth via fpc-pascal
wrote:
This is forbidden by design.
Why? It makes sense it should resolve to: d.setter(d.getter + 10) but maybe
there’s a problem?
Regards,
Ryan
delphi apparently functions the same if I've read the docs right. something about returning control to the exception handler BEFORE your program gets control back.--Alexander Grotewohlhttp://dcclost.comOn Jun 23, 2019 3:08 AM, Dennis wrote:Using fpc 3.0.4, Lazarus 2.0, the following simple
The whole structure is documented herehttps://docs.microsoft.com/en-us/windows/desktop/api/commdlg/ns-commdlg-tagofnaI just read through it and noticed that. My guess is anything that takes multiple strings that way.--Alexander Grotewohlhttp://dcclost.comOn May 23, 2019 12:09 PM, James Richters
I did notice lpstrFilter is terminated by one #0 instead of two. Other than that not at a pc to test.--Alexander Grotewohlhttp://dcclost.comOn May 23, 2019 7:52 AM, James Richters wrote:I have put together a program that demonstrates the issue I am having. I have re-structured it a bit to try to
I'm not sure your familiarity with debuggers but you would set a breakpoint inside your code and step through until it crashes, perhaps watching a few variables to ensure their contents are correct.Since it would work similar to turbo pascal and by extension, more modern "clone"/work-alikes, the
if it's not being used, remove it :)but really though, do any of the fleshed out examples on the website work? like the one from here?:https://www.freepascal.org/docs-html/rtl/keyboard/getkeyevent.html--Alexander Grotewohlhttp://dcclost.com___
fpc-pascal
http://wiki.freepascal.org/Helper_typesunder the checklistbox extender example.I'd guess it's looking for THelper.GetX and THelper.SetX in your and not finding them--Alexander Grotewohlhttp://dcclost.com___
fpc-pascal maillist -
Don't bring OS/2 into this. The creators of REXX are saints. lmao
On 4/18/19 7:48 PM, Tomas Hajny wrote:
On Thu, April 18, 2019 20:33, Sven Barth via fpc-pascal wrote:
.
.
Huh? What about
=== code begin ===
if CONDITION (
BLA1
BLA2
BLA3
)
=== code end ===
I'm using
Mr. Bee, you could use stunnel in the meantime, and look into
implementing fcgi into simpleserver? :)
What's your objective? Small servers like mini_httpd can be made to run
freepascal binaries with little fuss, and would be sufficient for
everything up until professional usage. At which
anything. I'm not sure how this is normally
done with GetSaveFileNameA.
-Original Message-
From: fpc-pascal On Behalf Of
Alexander Grotewohl
Sent: Sunday, November 4, 2018 11:48 AM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] Windows programming tutorials for FPC
Program TestGetSaveFileNameA;
Uses windows, commdlg;
Var
TFilename : TOpenFileNameA;
ret: array[0..100] of char;
Begin
Writeln('Start');
fillchar(TFileName, sizeof(TFileName), 0);
TFileName.lStructSize:=sizeof(TFileName);
A bit off topic for the list but I've used a program called "Insomnia"
which is a client for debugging REST APIs and it was incredibly handy.
Especially so you don't try everything under the sun before, for
example, realizing your API key is incorrect.
Alex
On 10/7/2018 4:03 PM, Marc
I don't really know why this NewPascal stuff is on this mailing list.
On 05/25/2018 11:59 AM, Maciej Izak wrote:
2018-05-25 16:10 GMT+02:00 Tomas Hajny >:
I assume that the functionality added to trunk (and as far as I
remember
also
What would the expected behavior be for pointers inside records? What if
the record is actually a linked list? Or includes classes and objects?
Do we run the constructor or no? If the record has file handles do we
attempt to recreate their state? (perhaps running assign again, and
crossing our
I should probably also note that you shouldn't use move with records
that have ansistrings or other dynamically allocated variables in them..
On 5/15/2018 6:49 PM, Alexander Grotewohl wrote:
type
TRec = record
s1:string;
i1:integer;
end;
var
S1,S2:string;
R1,R2:TRec;
begin
type
TRec = record
s1:string;
i1:integer;
end;
var
S1,S2:string;
R1,R2:TRec;
begin
S1:='123';
S2:=S1; // lol
R1.s1:='123';
R1.i1:=1;
move(R1, R2, sizeof(TRec));
writeln(R2.s1, ' ', R2.i1);
end.
On 5/15/2018 2:39 PM, denisgolovan wrote:
Well.
"Copy" works for
FPC for ARM works correctly with termux, but the program to generate
fpc.cfg does not, requiring some manual configuration to get it to find
the included units, etc.
On 05/10/2018 07:19 AM, Mark Morgan Lloyd wrote:
Has anybody come across https://wiki.termux.com/wiki/Main_Page which
I've
Well with an attitude like that, here's hoping you leave the pascal
community sooner than later :)
On 04/25/2018 11:19 AM, Ryan Joseph wrote:
On Apr 25, 2018, at 10:07 PM, Alexander Grotewohl <a...@dcclost.com> wrote:
At work I've recently used Free Pascal to interface our acco
At work I've recently used Free Pascal to interface our accounting
system to our WordPress WooCommerce store using Free Pascal's built in
JSON support, fphttpclient, etc.
I could list off a bunch of new languages with goofy names that could
have done it, but Free Pascal did it just fine.
imagine a linked list.. with nothing but the pointers.. lol
On 4/22/2018 1:05 PM, Jonas Maebe wrote:
On 22/04/18 17:00, Mattias Gaertner wrote:
Is this a bug or a feature:
type
Pint = ^int;
int = PInt;
?
It's a bug.
Jonas
___
fpc-pascal
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
Just to be clear, the 64 in GetTickCount64 has nothing to do with
whether a machine is 32bit or 64bit.
Alex
On 04/11/2018 01:23 PM, Karoly Balogh (Charlie/SGR) wrote:
Hi,
On Wed, 11 Apr 2018, Michael Van Canneyt wrote:
personally I use this 64 bit emulation:
For my purpose I'm perfectly
It's deprecated by Microsoft. If I had to guess, it's likely not going
anywhere until 32bit binary support in Windows is long gone.
Should you use GetTickCount on any Windows system that supports
(natively) GetTickCount64? NO, not in new code.
That's exactly what deprecated means.
IMO
The documentation seems fine. I can use it to approximate that a minute
has elapsed, or to keep track of frames per second for a game, but I'm
not going to use it to control complex machinery.
The GetTickCount documentation offers that most system timers are within
the 10 to 16 millisecond
indeed. there are other type declarations where 'set of' is valid, so
maybe it inadvertently piggybacks on those
to correct the code.. something like:
{$scopedenums on}
type
bar = (a, b, c);
var
foo: set of bar;
begin
foo:=[bar.a, bar.c];
if bar.a in foo then
writeln('yay obscure
Those newsgroups are a horrid suggestion. The most recent messages are
from 2016. It seems they only leave it up for posterity.
On 04/07/2018 05:13 AM, Graeme Geldenhuys wrote:
On 2018-04-04 16:05, Bo Berglund wrote:
Yes, I use Indy since the Delphi days but I have not used it to send
files
I can't help but feel like they'd still just download regular fpc and
use it at the console with the help of a minimal syntax highlighting
editor. Don't get me wrong, that's exactly how I like to use fpc, but I
already know lazarus is awesome for all the bells and whistles.
The problem with
65 matches
Mail list logo