Re: [fpc-pascal] How to create AnsiString with specific code page?

2021-09-15 Thread Bart via fpc-pascal
On Wed, Sep 15, 2021 at 12:14 PM Abuy via fpc-pascal wrote: > I need string with Windows-1251. Tried var msg: AnsiString(1251) but > this does not work. What I am doing now is This should work type StringCP1251 = AnsiString(1251) var S: StringCP1251; --

Re: [fpc-pascal] How to create AnsiString with specific code page?

2021-09-15 Thread Bart via fpc-pascal
On Wed, Sep 15, 2021 at 12:32 PM Bart wrote: > This should work > > type > StringCP1251 = AnsiString(1251) That should be type StringCP1251 = type AnsiString(1251); -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepasc

[fpc-pascal] Code page for the Windows event viewer

2021-09-15 Thread Abuy via fpc-pascal
: {$MODE objfpc} {$ifdef mswindows}{$apptype console}{$endif} {$R C:\lazarus\fpc\3.2.0\source\packages\fcl-base\src\win\fclel.res} program Project1; uses EventLog, sysutils; type StringCP1251 = type AnsiString(1251); var logger:teventlog; //msg:StringCP1251; msg:rawbytestring; begin msg

Re: [fpc-pascal] Code page for the Windows event viewer

2021-09-15 Thread Abuy via fpc-pascal
UnicodeString change only look of symbols (instead of quastion marks this — Іівівйц ГђВ№ вфівфъ2цву йцуцйівів). No BOM. File is UTF-8. No command line parameters. On 15.09.2021 16:53, Tomas Hajny via fpc-pascal wrote

[fpc-pascal] String.Split(const Separators: array of Char; Options: TStringSplitOptions)

2021-09-16 Thread Bart via fpc-pascal
Hi, I must be missing something obvious. But given the following definition of the Split() helper function for strings: Function Split(const Separators: array of Char; Options: TStringSplitOptions): TStringArray; overload; (fpc 3.2.2) Why does this not compile: var SA: TStringArray

Re: [fpc-pascal] Code page for the Windows event viewer

2021-09-16 Thread Abuy via fpc-pascal
No change. On 16.09.2021 13:28, Tomas Hajny via fpc-pascal wrote: On 2021-09-15 16:09, Abuy via fpc-pascal wrote: UnicodeString change only look of symbols (instead of quastion marks this — Іівівйц ГђВ№ вфівфъ2цву йцуцйівÑВ

Re: [fpc-pascal] FreePascal and MySQL 8.0

2021-09-20 Thread antlists via fpc-pascal
On 20/09/2021 00:12, Ralf Quint via fpc-pascal wrote: On 9/18/2021 7:33 AM, Terry A. Haimann via fpc-pascal wrote: I just upgraded to a new laptop and see that MariaDB is using MySQL 8.0 . I also see there is no connector in my Free Pascal install for MySQL 8.0.  I do see that there is an open

Re: [fpc-pascal] FreePascal and MySQL 8.0

2021-09-21 Thread LacaK via fpc-pascal
https://github.com/fpc/FPCSource/tree/main/packages/mysql I do not understand. I see a source file for mysql80dyn.pp, but shouldn't tthere also be a mysql80conn.pp? It is in https://github.com/fpc/FPCSource/tree/main/packages/fcl-db/src/sqldb/mys

Re: [fpc-pascal] Is the Lazarus list down? (2021-10-04)

2021-10-04 Thread DougC via fpc-pascal
I received the original posting and also the second direct attempt. Doug C. On Mon, 04 Oct 2021 04:36:32 -0400 Bo Berglund via fpc-pascal wrote On Mon, 04 Oct 2021 10:28:38 +0200, Bo Berglund via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org> wrote: >I have

Re: [fpc-pascal] Is the Lazarus list down? (2021-10-04)

2021-10-06 Thread Allan via fpc-pascal
On Mon, 04 Oct 2021 17:51:58 +0200 Bo Berglund via fpc-pascal wrote: > But on the lazarus list I post and I do not see my message at all in > the list, even now after so long time has passed. > But when I sent the same post via email to the list then it appeared > almost directly. A

Re: [fpc-pascal] Why the difference in the rounded results?

2021-10-15 Thread Ched via fpc-pascal
Hello All, In https://wiki.freepascal.org/Variables_and_Data_Types about Strings: // where: 1 < length <= 255 is to read as // where: 1 <= length <= 255 isn't it ? Cheers, Ched Le 15.10.21 à 18:44, James Richters via fpc-pascal a écrit : The difference is because of the w

Re: [fpc-pascal] Why the difference in the rounded results?

2021-10-15 Thread Guillermo via fpc-pascal
mpiled in a way that doesn't use the CPU math operations different operating systems/library versions may have different implementations for the same operation. Regards, Guillermo Martínez. El Fri, 15 Oct 2021 11:49:59 +0200 Gabor Boros via fpc-pascal escribió: > Hi All, > > I g

Re: [fpc-pascal] string vs char

2021-10-15 Thread Ched via fpc-pascal
Well, well, understand. OTOH, declaring a string of length 1 is sort of futile -- it uses two bytes where a plain char declaration takes just one byte. Not so futile as a string can be empty, not a char ! Regards, Dennis, Ched' _______ fpc-p

Re: [fpc-pascal] Writing Pascal Physics and Vectors

2021-10-15 Thread DougC via fpc-pascal
n Fri, 15 Oct 2021 18:18:13 -0400 Anthony Walter via fpc-pascal wrote I've been working on writing Pascal bindings a friendly object orient interface  to a few open source projects. I have put together Chipmunk2D, NanoVG, MiniMP3, and SDL2 for rendering nice real time platform i

Re: [fpc-pascal] Writing Pascal Physics and Vectors

2021-10-15 Thread Ched via fpc-pascal
> Fade := Fade * Fade * Fade * Fade * Fade; Why not Fade:=sqr(sqr(Fade))*fade ? Cheers, Anthony, Ched Le 15.10.21 à 22:18, Anthony Walter via fpc-pascal a écrit : I've been working on writing Pascal bindings a friendly object orient interface to a few open source projects. I

[fpc-pascal] TFieldType declaration change in fixes2_2 branch

2021-10-16 Thread tony.whyman via fpc-pascal
patch to fixes_2_2 a mistake, or is there a good reason for rolling out a change that breaks other packages?Tony WhymanMWA Software___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Writing Pascal Physics and Vectors

2021-10-16 Thread wkitty42--- via fpc-pascal
ummm... the source code is on the linked page ;) On 10/16/21 2:58 AM, Darius Blaszyk via fpc-pascal wrote: Can you put the link up to the source code please? On 16 Oct 2021, at 00:27, Anthony Walter via fpc-pascal wrote: [...] https://www.getlazarus.org/videos/physics/collisions/ Source

Re: [fpc-pascal] FPC 3.2.2 Build Error on Mac

2021-10-17 Thread lazarus--- via fpc-pascal
Anthony Walter via fpc-pascal wrote on 18/10/21 12:08 am: I am trying to build FPC from 3.3.2 sources on a Mac and am getting errors complaining about two binary files having different sizes. Could someone help me figure out what's going on? Here is a list of what is output is in the ter

Re: [fpc-pascal] Repost: TFieldType declaration change in FPC fixes_3_2 branch

2021-10-17 Thread LacaK via fpc-pascal
there you have "DefaultFieldClasses" array which is affected, right? I agree that it is not ideal situation, but release cycle for major versions of FPC are so long that postpone all these additions to major releases means that users must wa

Re: [fpc-pascal] ExtractStrings by line in Windows

2021-11-03 Thread Bart via fpc-pascal
On Wed, Nov 3, 2021 at 1:57 PM Hairy Pixels via fpc-pascal wrote: Maybe use SomeString.Split([LineEnding'], ...)? Split has an overload that takes an array of string as first paramter. -- Bart _______ fpc-pascal maillist - fpc-p

Re: [fpc-pascal] ExtractStrings by line in Windows

2021-11-04 Thread Bart via fpc-pascal
On Thu, Nov 4, 2021 at 2:52 PM Ryan Joseph via fpc-pascal wrote: > > Maybe use SomeString.Split([LineEnding'], ...)? > > Split has an overload that takes an array of string as first paramter. > > Thanks, I guess I need to use a different way to work on all platforms. If y

[fpc-pascal] target mipsel-embedded

2021-11-28 Thread Sergey via fpc-pascal
I am trying to build a mipsel-embedded compiler. It says here that this is possible https://wiki.freepascal.org/TARGET_Embedded_Mipsel. I followed the steps below git clone https://github.com/fpc/FPCSource.git cd ./FPCSource make clean buildbase installbase INSTALL_PREFIX=$HOME/mips/fpc-mipsel

Re: [fpc-pascal] Getting Last User Input reliably

2021-12-06 Thread wkitty42--- via fpc-pascal
On 12/5/21 11:10 AM, James Richters via fpc-pascal wrote: So the only thing I need to consider is times of longer than 49.7 days without user input... because if it was exactly 50 days, it would look like 0.3 days as the first rollover would be forgotten. To take care of this I can just check it

Re: [fpc-pascal] Not available duties

2021-12-24 Thread Bart via fpc-pascal
On Fri, Dec 24, 2021 at 12:02 PM Adriaan van Os via fpc-pascal wrote: > I got a message from UPS this morning stating > > "! Duties, taxes, and fees totaling NaN are due for this delivery." > > Oops, I don't hope I will ever get a message from UPS > >

Re: [fpc-pascal] [Pas2js] FPC and WebAssembly

2021-12-25 Thread greim--- via fpc-pascal
Congratulations! and Frohe Weihnachten Markus --- original message --- On December 24, 2021, 2:16 PM GMT+1 fpc-pascal@lists.freepascal.org wrote: >> And yes, we can do graphics too: >> >> https://www.freepascal.org/~michael/pas2js-demos/wasienv/terminal/ >

Re: [fpc-pascal] {$include %dateyear%}

2021-12-25 Thread Ched via fpc-pascal
Helolo James, Thank you for your comment and proposal. As there is no type associated with non-string results, would it be better to say number instead of integer ? Or integer number ? Season's greetings ! Cheers, Ched' Le 24.12.2021 à 22:32, James Richters via fpc-pascal a

Re: [fpc-pascal] {$include %dateyear%}

2021-12-25 Thread Ched via fpc-pascal
;t really know what to call it, but integer seems to indicate it has a type, so I agree it should be distinguished from any specific variable type. James _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Improved FPC JSON-RPC support

2021-12-29 Thread wkitty42--- via fpc-pascal
On 12/29/21 4:54 AM, Michael Van Canneyt via fpc-pascal wrote: Translated to RPC: if you want speed, don't use HTTP or JSON. WST offers a binary protocol and plain TCP channel, it's bound to be much faster. i'm sorry... what is WST? googling for "wst binary protocol tcp

Re: [fpc-pascal] Improved FPC JSON-RPC support

2021-12-29 Thread wkitty42--- via fpc-pascal
On 12/29/21 6:29 AM, Graeme Geldenhuys via fpc-pascal wrote: On 2021-12-29 11:22, wkitty42--- via fpc-pascal wrote: i'm sorry... what is WST? googling https://wiki.lazarus.freepascal.org/Web_Service_Toolkit thank you! :) -- NOTE: No off-list assistance is given without prior app

Re: [fpc-pascal] [Lazarus] [Pas2js] FPC and WebAssembly

2022-01-02 Thread Tarnyko via fpc-pascal
___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN

2022-01-04 Thread Trev via fpc-pascal
Dmitry Boyarintsev via fpc-pascal wrote on 5/1/22 12:17 pm: You probably want to give a bit more context here. 1. The error seems to be visible only in Safari (iOS or macOS). You can add the SeaMonkey web browser on FreeBSD to the list. ___ fpc

Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN

2022-01-04 Thread DougC via fpc-pascal
2022 21:37:09 -0500 Trev via fpc-pascal wrote Dmitry Boyarintsev via fpc-pascal wrote on 5/1/22 12:17 pm: > You probably want to give a bit more context here. > > 1. The error seems to be visible only in Safari (iOS or macOS). You can add the SeaMonkey web browser on FreeBSD to

[fpc-pascal] FPF 3.04 and Synapse

2022-01-06 Thread Vern via fpc-pascal
Is Synapse compatible with FPC 3.04  and which link should be used for the Synapse code as there are several ? Thanks Brian ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread DougC via fpc-pascal
Tor. via fpc-pascal wrote Hello. As I see in the commit https://gitlab.com/freepascal.org/fpc/source/-/commit/beecbf1581a986f544fde77aa428e05c21a35f6f StrToInt always uses ShortString buffer: Function fpc_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; out Code

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread DougC via fpc-pascal
So, are you saying the one cannot declare an IntToStr function with the string represented by a PChar argument? Seems pretty straightforward to me. Isn't that what is being requested? Doug C. On Wed, 12 Jan 2022 11:10:57 -0500 Sven Barth via fpc-pascal wrote Doug

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread Bart via fpc-pascal
On Wed, Jan 12, 2022 at 3:13 PM Michael Van Canneyt via fpc-pascal wrote: > From the definition you can see it is a compilerproc function, meaning that > the > compiler writes direct calls to this. > To change the signature of the function means the compiler itself also must

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread Bart via fpc-pascal
get on trying to fix hte range check errors then. -- Bart _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-13 Thread Bart via fpc-pascal
On Wed, Jan 12, 2022 at 11:33 PM Sven Barth via fpc-pascal wrote: > You can see it in Florian's commit to the branch about range checking where > he added the DestSize parameter. Yes, I discovered that. Will study a bit how this is done, just for the fun of it.

Re: [fpc-pascal] Interface section overload procedures are all public

2022-01-23 Thread Bart via fpc-pascal
On Sun, Jan 23, 2022 at 6:12 PM Rainer Stratmann via fpc-pascal wrote: > // making only one procedure bugtest public in the interface section > // makes all other bugtest procedures public as well! > // Lazarus 2.0.0+dfsg-2 > // FPC-Version: 3.0.4 > // OS: Linux Debian 32 Bit

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread Bart via fpc-pascal
On Mon, Feb 7, 2022 at 9:54 PM James Richters via fpc-pascal wrote: > The part of my program that checks for the BOM is bigger than the actual CSV > read and write. Please let me know if the crash issue with no BOM gets fixed > so I can delete all this stuff that checks for it. That

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

2022-02-10 Thread LacaK via fpc-pascal
now of a way to just send pain text to a USB printer with FPC ,preferably without Lazarus? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Bit manipulation helpers

2022-02-21 Thread gabor via fpc-pascal
W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze: Oh my, I was confusing my terms I think. I wanted to do bit masking (I think it's called). I was expecting there to be something like TestFlag in the RTL since I can never remember the syntax "Value = (Value or Index)&qu

Re: [fpc-pascal] Bit manipulation helpers

2022-02-21 Thread gabor via fpc-pascal
W dniu 2022-02-21 o 13:34, gabor via fpc-pascal pisze: W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze: Oh my, I was confusing my terms I think. I wanted to do bit masking (I think it's called). I was expecting there to be something like TestFlag in the RTL since I can

[fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-10 Thread Peter via fpc-pascal
I've been working with a fork of C-evo for a while now. Its been very stable for at least a year. However, recently a game locked up in a (wide) cpu loop. The broken code is in the shared library, built with FPC 3.2.2, its nothing to do with Lazarus, except that Lazarus code calls the librar

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-10 Thread Peter via fpc-pascal
eaq83296(%rsp),%rsp popq%r15 popq%r14 popq%r13 popq%r12 popq%rbx ret .Lc26: .Le8: _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-10 Thread Peter via fpc-pascal
On 10/03/2022 22:46, Sven Barth via fpc-pascal wrote: Peter via fpc-pascal schrieb am Do., 10. März 2022, 23:39: There are four source files, around 250k, to compile this library. I can supply them if anyone wants to investigate. Is this sufficient for a bug report?  Does anyone know

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-11 Thread Peter via fpc-pascal
So it seems it was fixed in main at least. Now the interesting question is 3.2.3... Hi Sven, I found a 3.2.3 in ftp://ftp.freepascal.org/pub/fpc/snapshot/v32/x86_64-linux Testing with version Free Pascal Compiler version 3.2.3 [2022/03/05] for x86_64 the problem is still there I&#

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-11 Thread Peter via fpc-pascal
Peter _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-12 Thread Peter via fpc-pascal
Its looking like it was fixed in main somewhere between 31cd3df7    24 Jan, 2021 & 837b433a    28 Apr, 2021 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-13 Thread Peter via fpc-pascal
On 12/03/2022 11:33, Florian Klämpfl via fpc-pascal wrote: Am 12.03.2022 um 12:05 schrieb Peter via fpc-pascal : Its looking like it was fixed in main somewhere between 31cd3df724 Jan, 2021 & 837b433a28 Apr, 2021 Can you bisect it by any chance? See https://wiki.freepascal

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-13 Thread Peter via fpc-pascal
On 13/03/2022 18:19, Florian Klämpfl via fpc-pascal wrote: Thanks for tracking this down! I have cherry picked the commit to fixes. Great! It was a nasty bug. Good to see it fixed for the next release. ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-14 Thread Peter via fpc-pascal
On 14/03/2022 06:59, Sven Barth via fpc-pascal wrote: Peter via fpc-pascal schrieb am So., 13. März 2022, 22:58: On 13/03/2022 18:19, Florian Klämpfl via fpc-pascal wrote: > Thanks for tracking this down! I have cherry picked the commit to fixes. Great! It was a nasty bug. G

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2022-03-14 Thread Peter via fpc-pascal
Loc := PreLoc[TestLoc]; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] converting to UTF8

2022-03-23 Thread cibersvaa--- via fpc-pascal
Lazarus 2.012 FPC: 3.2.0 SVN: 64642 OS: Windows 10 Pro/win64 I'm reading from a file with character set win1252, I want to convert it to utf8, but I can't. procedure TestString; var Original:string; Converted:string; begin original:='ESPA'#209'A'

Re: [fpc-pascal] converting to UTF8

2022-03-23 Thread LacaK via fpc-pascal
ginal, 1252, False); SetCodePage(original, CP_UTF8, True); -Laco. _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] converting to UTF8

2022-03-24 Thread Santi via fpc-pascal
El 23/03/2022 a las 10:51, Mattias Gaertner via fpc-pascal escribió: FPC does not yet understand comments, What do you mean with "understand comments"? so maybe it does not know this literal is cp1252. Add {$codepage cp1252} somewhere at the start of the unit. If this is part of

[fpc-pascal] Compiler internals. Changing dynamic arrays format

2022-04-12 Thread denisgolovan via fpc-pascal
Hi all I've been maintaining a set of private patches for some quite old FPC revision for some years. The idea behind those patches to ease interoperation between FPC and LuaJIT FFI by pointer tagging for dynamic arrays. For that to happen I was forced to modify "tdynarray" recor

Re: [fpc-pascal] Compiler internals. Changing dynamic arrays format

2022-04-13 Thread denisgolovan via fpc-pascal
> On 2022-04-13 00:34, denisgolovan via fpc-pascal wrote: > Your comment about conditional defines goes in the right direction - > basically: > > 1) Separate your changes into parts affecting the compiler behaviour > (e.g. the changes impacting the compiled structures an

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-20 Thread denisgolovan via fpc-pascal
That seriously improves generic code readability. Definitely worth trying to upgrade. Thanks a lot! 20:15, 20 апреля 2022 г., "Sven Barth via fpc-pascal" :Dear FPC community,The FPC developers are pleased to announce the implementation of a new feature: implicit generic function speci

Re: [fpc-pascal] Feature announcement: implicit generic function specializations

2022-04-22 Thread denisgolovan via fpc-pascal
specialize TPtr.P):boolean; ====== Denis Golovan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Different levels of the same compiler message

2022-05-23 Thread gabor via fpc-pascal
variable of a managed type does not seem to be initialized project1.lpr(12,19) Warning: Function result variable of a managed type does not seem to be initialized Regards, Michał. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https

Re: [fpc-pascal] Feature Announcement: Function References and Anonymous Functions

2022-05-30 Thread Bart via fpc-pascal
On Mon, May 30, 2022 at 7:25 AM Sven Barth via fpc-pascal wrote: > === code begin === > > Sort(lamba (left, right) as > if left < right then -1 > else if left > right then 1 > else 0); > This doesn't look like Pascal at all. I definitively hope this is

Re: [fpc-pascal] Be careful of too many features

2022-05-30 Thread Brian via fpc-pascal
On 5/30/22 14:59, Steve Litt via fpc-pascal wrote: Hi all, In 1984 I started my programming career with Whitesmith Pascal, Sorry for the off-topic post, folks, but this just opened a wound from my distant past... :( I was a couple of years ahead of you, Steve, but at least in 1982 on the

Re: [fpc-pascal] no array support in sqldb/sqldbrestbridge?

2022-06-07 Thread LacaK via fpc-pascal
Hi, So, is there no array field support in sqldb and/or in sqldbrestbridge? there was added into DB.pas : TObjectField and TArrayField https://gitlab.com/freepascal.org/fpc/source/-/blob/main/packages/fcl-db/src/base/db.pas but implementation is incomplete. Methods in fields.inc are empty

[fpc-pascal] Workaround for fpcres requiring absolute path

2022-06-27 Thread Russ via fpc-pascal
Hi, I use windres on Windows and Linux 32 and 64 bit (via mingw), but that doesn't work on ARM Linux - so I thought I would try using fpcres on Lazarus 2.3.0 and FPC 3.31 using the -FF option, but found that fpcres seems to require an absolute path whereas windres can use a relative

Re: [fpc-pascal] fpc-pascal Digest, Vol 216, Issue 16

2022-06-29 Thread Russ via fpc-pascal
paths in the RC file. Option 1 works with both fpcres and WinRes. Thank you, Russ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Bug or feature ?

2022-07-27 Thread Ched via fpc-pascal
;m wondering if the first line is really legal... Any advice ? Cheers, Ched'. ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Bug or feature ?

2022-07-27 Thread DougC via fpc-pascal
WRITELN(F: 'Hello'); is not proper Pascal._______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Bug or feature ?

2022-07-27 Thread Ched via fpc-pascal
Le 27.07.2022 à 17:41, DougC via fpc-pascal a écrit : WRITELN(F: 'Hello'); is not proper Pascal. Yes, Doug, I agree ; but it is compiled with no warning and runs perfectly. Now, why the compiler do not complain... ? Cheers, Ched' _______

Re: [fpc-pascal] Union followed by Property does not compile !

2022-08-03 Thread wkitty42--- via fpc-pascal
On 8/2/22 5:12 AM, Michael Van Canneyt via fpc-pascal wrote: The variant part of a record must always come last. FWIW: is this documented somewhere easily found? -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it

Re: [fpc-pascal] Access Violation When SetLength(DynArray, Value)

2022-09-08 Thread wkitty42--- via fpc-pascal
On 9/8/22 9:54 AM, Anthony Walter via fpc-pascal wrote: Please ignore this post. I fixed the issue. curious minds want to know: what was the fix? -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-10 Thread wkitty42--- via fpc-pascal
On 9/9/22 5:54 PM, James Richters via fpc-pascal wrote: I have some key sequences with PTCCRT.READKEY where I use a lower case letter to do one thing and an uppercase to do another, but if the Capslock is on, they do the wrong things. Is there a way I can check the condition of the shift key

Re: [fpc-pascal] Get highest element of a StringList

2022-09-10 Thread Bart via fpc-pascal
On Sat, Sep 10, 2022 at 6:01 PM James Richters via fpc-pascal wrote: > Is there a way to get the highest element of a stringlist other than: > > For Loop := 0 to MyStringList.Count-1 do You can use the for .. in loop. > It would be nice to not have the -1 > Could High() be made

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-11 Thread wkitty42--- via fpc-pascal
7;m not even going to try writing any code this time... i don't have FPC or even TP/BP installed any more since i stopped writing code for fidonet stuff some years back ;) -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffi

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Bart via fpc-pascal
On Wed, Oct 5, 2022 at 8:33 AM Hairy Pixels via fpc-pascal wrote: > Does CodeTools not understand generic class function calls? Here is the class > in question: CodeTools is part of Lazarus. So, better ask on the Lazarus ML. (And yes, CodeTools has problems with generics.) --

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Bart via fpc-pascal
On Wed, Oct 5, 2022 at 2:17 PM Hairy Pixels via fpc-pascal wrote: > > CodeTools is part of Lazarus. ... > > Ok thanks. I’m not a Lazarus user so I don’t really follow those forums. > Ok, that makes me kinf of curious wether you and I mean the same when we refer to CodeTools. I m

Re: [fpc-pascal] iOS

2022-10-06 Thread wkitty42--- via fpc-pascal
On 10/6/22 9:40 AM, Hairy Pixels via fpc-pascal wrote: On Oct 6, 2022, at 7:12 PM, Adriaan van Os via fpc-pascal wrote: I would be pleased to know where I can find the latest iOS parsed headers and possibly a hello program. Also, the cross compilers for iOS don't seem to be availab

Re: [fpc-pascal] Program efficiency

2022-11-09 Thread DougC via fpc-pascal
Richters via fpc-pascal wrote --- Sounds to me that if the compiler will probably insert temp variables anyway, then I might as well make my own and make it easier to understand later.   James ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Program efficiency

2022-11-09 Thread geneb via fpc-pascal
On Wed, 9 Nov 2022, DougC via fpc-pascal wrote: Maintaining understandable and readable code is often more important that runtime efficiency. Like others have said, there are likely many additional places you can address overall efficiency before dealing with these calculations. THIS

Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-28 Thread wkitty42--- via fpc-pascal
On 12/27/22 9:37 PM, Anthony Walter via fpc-pascal wrote: "I see there's a timer there.. but what starts it? What happens when it times out? How do I set the amount of time? Why is there even a timer at all? I don't know any of this." James, when you raised these questions

Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-29 Thread DougC via fpc-pascal
. Let it be. Doug C.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-29 Thread wkitty42--- via fpc-pascal
On 12/29/22 6:40 AM, Michael Van Canneyt via fpc-pascal wrote: I also had to learn that there are programmers that have not seen a single SQL statement in their life :) i remember working on an inventory program using FoxBase from before m$ acquired it... i laid out the databases (now called

Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-30 Thread geneb via fpc-pascal
On Thu, 29 Dec 2022, Anthony Youngman via fpc-pascal wrote: On 29/12/2022 12:31, Anthony Walter via fpc-pascal wrote: @youngman "I'm a database guy with maybe 30 years experience, I'm new to SQL and oh my god is it an over-complicated monster ..." Wait, what? Somethin

[fpc-pascal] Question on TFPGMap

2023-01-01 Thread ppadilcdx--- via fpc-pascal
I have a simple example that gives an access violation on the latest macos (fpc mode, i.e. no mode switch). What am I missing? Thanks in advance: program ex; uses fgl; var d: specialize TFPGMap; begin    decode.create;    decode.add('X', 1); end. An unhandled exception o

Re: [fpc-pascal] Question on TFPGMap

2023-01-01 Thread ppadilcdx--- via fpc-pascal
Sorry copy and paste error. d = decode. Corrected below.  But I think I see what you mean.  Just assigning a type to decode doesn't initialize it. But the compiler is happy with it, i.e. it doesn't call as illegal the statement "decode.create". On 1/1/23 5:21 PM, Hairy P

Re: [fpc-pascal] For Loop with QWord

2023-01-03 Thread Bart via fpc-pascal
On Tue, Jan 3, 2023 at 3:49 PM James Richters via fpc-pascal wrote: > Var > > I: QWord; > > Begin > > For I := 1 To N Do > It generates an error: > Error: Ordinal expression expected > If I change it to LongInt, then it works, but the question is, why can’t I

Re: [fpc-pascal] A rather good blog post on Object Pascal that I thought you folks might enjoy

2023-01-18 Thread Abuy via fpc-pascal
Lazy post. Bad writing. Could be better. On 18.01.2023 11:36, Liam Proven via fpc-pascal wrote: Why Object Pascal is More Than Meets the Eye: Exploring the Power and Versatility of Delphi and FreePascal https://blog.rosseaux.net/post/a346cfec6211430a62c28e765710954d

Re: [fpc-pascal] A rather good blog post on Object Pascal that I thought you folks might enjoy

2023-01-19 Thread wkitty42--- via fpc-pascal
On 1/19/23 12:46 AM, Abuy via fpc-pascal wrote: Lazy post. Bad writing. Could be better. i don't know what you were expecting but it reads fine and good to me... thank you Liam for sharing it... also thank you for the FreeDOS interview shared on The Register! :) On 18.01.2023 11:36,

Re: [fpc-pascal] A rather good blog post on Object Pascal that I thought you folks might enjoy

2023-01-19 Thread geneb via fpc-pascal
On Thu, 19 Jan 2023, Liam Proven via fpc-pascal wrote: On Thu, 19 Jan 2023 at 11:21, wkitty42--- via fpc-pascal wrote: thank you Liam for sharing it... also thank you for the FreeDOS interview shared on The Register! :) Oh, you are very welcome. I am glad some people enjoyed it. Liam

Re: [fpc-pascal] A rather good blog post on Object Pascal that I thought you folks might enjoy

2023-01-19 Thread geneb via fpc-pascal
On Thu, 19 Jan 2023, Liam Proven via fpc-pascal wrote: On Thu, 19 Jan 2023 at 15:01, geneb via fpc-pascal wrote: Liam, the things you write are pretty consise and clear I think my editor would choke on his tea to read me called "concise"! Hehe. - the linked article however..

Re: [fpc-pascal] A rather good blog post on Object Pascal that I thought you folks might enjoy

2023-01-20 Thread wkitty42--- via fpc-pascal
On 1/19/23 8:48 AM, Liam Proven via fpc-pascal wrote: So when they see something like, say, Lazarus as FOSS, it can amaze them. Which is one reason I wrote this: https://www.theregister.com/2022/12/16/gcc_13_will_support_modula2/ oh! i know a fellow in Australia who might be interested in

Re: [fpc-pascal] possible bug in blockwrite

2023-03-05 Thread Bart via fpc-pascal
On Sun, Mar 5, 2023 at 7:02 PM Travis Siegel via fpc-pascal wrote: > On tp, I could open a file with a blocksize of 1, > > reset(file1,1); > ... > For example. > > Let's say I have a 5 byte string: > > st1 := '12345'; > > Now, if I blockwrite

Re: [fpc-pascal] possible bug in blockwrite

2023-03-06 Thread wkitty42--- via fpc-pascal
On 3/5/23 12:54 PM, Travis Siegel via fpc-pascal wrote: [...] This reminded me that I used to do this exact thing under turbo pascal by using blockread/writes, and treating the text file as a binary one. This allowed me to make changes without having to rewrite the whole file, something even

Re: [fpc-pascal] Cache-line alignment for records

2023-03-27 Thread denisgolovan via fpc-pascal
ignment to type itself instead of variable, right? -- Regards, Denis Golovan ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Cache-line alignment for records

2023-03-27 Thread denisgolovan via fpc-pascal
> It is possible > (https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/test/talignrec1.pp), > but it is subject to the same limitations when declaring variables of > those types. > > Jonas Aha. Nice! Does it work recursively? I mean - does it work when aligned

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Ched via fpc-pascal
e 29.03.23 à 21:07, Jonas Maebe via fpc-pascal a écrit : On 29/03/2023 16:00, Matias Ezequiel Vara Larsen via fpc-pascal wrote: So if I have a type like: test = record    r: DWord;    s: Word; end; Then, I define the variable `nada` as an array of `test` type: var    nada: array[0..2] of test;

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Bart via fpc-pascal
On Tue, Apr 4, 2023 at 9:43 AM Jacob Kroon via fpc-pascal wrote: > What is the technical downside to using "const", or is it just cosmetic ? If your local "writeable constant" is of type string, and strings are longstrings, and the writeable const is assigned a value

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Bart via fpc-pascal
On Tue, Apr 4, 2023 at 6:00 PM Tomas Hajny via fpc-pascal wrote: > Well, managed types are not very likely in code imported from a Pascal > compiler not knowing units... Well, his fpc.cfg might define string to be ansistring... -- Bart _____

[fpc-pascal] FPC ARM inline Assembler

2023-04-06 Thread Vern via fpc-pascal
Does the current FPC compiler support  ARM inline assembler ? If so what is the equivalent ARM command for {$ASMMODE intel} Thanks Brian ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo

Re: [fpc-pascal] FPC ARM inline Assembler

2023-04-06 Thread Vern via fpc-pascal
After reading the FPC manual more closely , the correct compiler command is {$ASMMODE default} where/default /is the native system ... in this case Orange Pi arm64 and the compiler now allows accepting ARM assembler instructions. However it won't allow referencing a Pascal variable. He

<    1   2   3   4   5   6   7   8   9   10   >