Re: [fpc-pascal] download site and mixed http

2024-04-25 Thread Tomas Hajny via fpc-pascal
On 2024-04-25 15:16, Mattias Gaertner via fpc-pascal wrote: Hi Matthias, On https://www.freepascal.org/down/x86_64/linux-hungary.html are links without "https://;, causing the browser to bark: "File not downloaded: Potential security risk". Thanks for reporting it. In addition, the

Re: [fpc-pascal] AnsiString address changed

2024-03-18 Thread Tomas Hajny via fpc-pascal
On 2024-03-18 13:29, Hairy Pixels via fpc-pascal wrote: On Mar 18, 2024, at 5:29 PM, Michael Van Canneyt via fpc-pascal wrote: Of course there must be, that's the whole point of copy-on-write. As soon as one reference is changed, a copy is made if the reference count is larget than 1, and

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Tomas Hajny via fpc-pascal
On 2024-03-14 11:06, Marco van de Voort via fpc-pascal wrote: Op 14-3-2024 om 11:04 schreef Michael Van Canneyt via fpc-pascal: To me it therefore seems a better idea to move the IDE to utils, and to have a toplevel make command that does the same as 'make all' simply without the

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Tomas Hajny via fpc-pascal
On 2024-03-14 09:34, Guillermo Martínez Jiménez via fpc-pascal wrote: Thanks, Karoly and Marco. I thought "packages" were libraries not applications, as there is an "utils" directory with programs. Well, yes, it's somewhat confusing admittedly. The IDE sources used to be located at the

Re: [fpc-pascal] Floating point question

2024-02-22 Thread Tomas Hajny via fpc-pascal
On 2024-02-22 15:08, Thomas Kurz via fpc-pascal wrote: If you're using Win64, then the answer is simple: x86_64-win64 unlike any other x86 target does not support Extended, so neither the compiler nor the code in runtime will ever calculate anything with that precision. That's another thing

Re: [fpc-pascal] Floating point question

2024-02-20 Thread Tomas Hajny via fpc-pascal
On 2024-02-20 08:03, Sven Barth via fpc-pascal wrote: James Richters via fpc-pascal schrieb am Di., 20. Feb. 2024, 04:42: I don't know why it would be different in Windows than on Linux. If you're using Win64, then the answer is simple: x86_64-win64 unlike any other x86 target does not

Re: [fpc-pascal] Nested comments.

2024-01-21 Thread Tomas Hajny via fpc-pascal
On 2024-01-21 13:21, Guillermo Martínez Jiménez via fpc-pascal wrote: Hi, I'm wondering if it is possible to make FPC detect and warn (or even stop compillation when) it has detect a nested comment. That's because I'm using Vim and it closes odd comments. For example, the nex code: { This

Re: [fpc-pascal] Quiz

2024-01-07 Thread Tomas Hajny via fpc-pascal
On 2024-01-07 20:47, Michael Van Canneyt via fpc-pascal wrote: On Sun, 7 Jan 2024, Adriaan van Os via fpc-pascal wrote: . . There is some special handling for 1. (ending with a dot) due to Delphi/TP compatibility, they accept it. . . kr5 = 1 . e + 2;

Re: [fpc-pascal] Strings greater than 255 characters

2023-12-19 Thread Tomas Hajny via fpc-pascal
On 2023-12-19 12:36, James Richters via fpc-pascal wrote: Hello James, I keep getting bit by using STRING variables then trying to store more than 255 characters. My typical way to fix this is to just change it to an ANSISTRING. I'm wondering if there is any reason not to do this the other

Re: [fpc-pascal] Cannot build fpc on Raspberry Pi4B running PiOS 64 bit (aarch64 Linux)

2023-11-21 Thread Tomas Hajny via fpc-pascal
On November 21, 2023 8:33:55 +0100, Bo Berglund via fpc-pascal wrote: . . >Here I lost you, is SF still in use? I thought that everything moved to GitLab >some time ago? SF is still used for distribution of releases, see download links on FPC web pages. This has nothing to do with migration

Re: [fpc-pascal] SeekEof issue & 2020 blog post by A Stolyarov

2023-09-11 Thread Tomas Hajny via fpc-pascal
? A (Stolyarov): To be honest, it's not clear - you'll have to pull out a snapshot and see. I really hope that this Tomas Hajny didn't understand what happens when you open a text stream and ended up not being able to do what he wanted to do -- cut off buffering for anything that isn't a file. If he

Re: [fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Tomas Hajny via fpc-pascal
from the remaining program. As an example, TProcess (in unit Process) provides means for all of this. Tomas Am Freitag, 1. September 2023, 16:13:54 CEST schrieb Tomas Hajny via fpc- pascal: On 2023-09-01 15:43, Rainer Stratmann via fpc-pascal wrote: Hello, > Where can I find the out

Re: [fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Tomas Hajny via fpc-pascal
On 2023-09-01 15:43, Rainer Stratmann via fpc-pascal wrote: Hello, Where can I find the output of the error messages if a program crashes. There is another program that still is running. I want to read the error messages automatically if that is possible. I'm afraid that we'd need a bit

Re: [fpc-pascal] Pointer question

2023-08-09 Thread Tomas Hajny via fpc-pascal
On August 10, 2023 at 0:06:57 +0200, Hairy Pixels via fpc-pascal wrote: >> On Aug 9, 2023, at 2:54 PM, Tomas Hajny via fpc-pascal >> wrote: >> >>> >>> 1) what does "i := x - x;" do and what is it's purpose and why doesn't "x + >>&g

Re: [fpc-pascal] Pointer question

2023-08-09 Thread Tomas Hajny via fpc-pascal
On August 9, 2023 at 22:14:17 +0200, Hairy Pixels via fpc-pascal wrote: >Playing around I had a more questions about pointer operations I've never used >myself. > >1) what does "i := x - x;" do and what is it's purpose and why doesn't "x + x" >work the same? Pointer subtraction is a reverse

Re: [fpc-pascal] msdos: unresolved external

2023-07-12 Thread Tomas Hajny via fpc-pascal
On 2023-07-12 12:27, Thomas Kurz via fpc-pascal wrote: I have to extend code from QuickBasic and am using the "msdos" target from FPC 3.2 for that purpose. The resulting exe file is linked with Microsoft Linker for DOS version 5.10. It links *.a files created both from QuickBasic and FPC. The

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Tomas Hajny via fpc-pascal
On 3 July 2023 9:12:03 +0200, Hairy Pixels via fpc-pascal wrote: >> On Jul 3, 2023, at 2:04 PM, Tomas Hajny via fpc-pascal >> wrote: >> >> No - in this case, the "header" is the highest bit of that byte being 0. > >Oh it's the header BIT. Admitte

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Tomas Hajny via fpc-pascal
On 3 July 2023 8:42:05 +0200, Hairy Pixels via fpc-pascal wrote: >> On Jul 3, 2023, at 12:04 PM, Mattias Gaertner via fpc-pascal >> wrote: >> >> No, the header of a codepoint to figure out the length. > >so the smallest character UTF-8 can represent is 2 bytes? 1 for the header and >1 for

Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Tomas Hajny via fpc-pascal
On 2023-06-30 11:11, Michael Van Canneyt via fpc-pascal wrote: On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote: On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote: That's why that worked. Hmm with short strings the null terminator could be truncated when copying right? Something to

Re: [fpc-pascal] Pchar from constant string

2023-06-29 Thread Tomas Hajny via fpc-pascal
On 2023-06-29 16:22, Mattias Gaertner via fpc-pascal wrote: On Thu, 29 Jun 2023 21:18:44 +0700 Hairy Pixels via fpc-pascal wrote: What is really happening in this snippet? I think it must be implicitly taking the address of the constant string but is it also adding the null terminator

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

2023-06-17 Thread Tomas Hajny via fpc-pascal
On 2023-06-18 03:04, Hairy Pixels via fpc-pascal wrote: On Jun 18, 2023, at 1:07 AM, tsie...@softcon.com wrote: This is interesting, because it's the first time I've ever seen "break" as a valid command in pascal, and I've been using pascal since the mid/late 80s. All kinds of dialects too,

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

2023-06-17 Thread Tomas Hajny via fpc-pascal
On 17 June 2023 20:45:49 +0200, Jean SUZINEAU via fpc-pascal wrote: >Le 17/06/2023 à 20:07, Travis Siegel via fpc-pascal a écrit : >> Is this a relatively new addition to fpc or something? > >I 've just found it in my Delphi 7 code (and code very likely written for >Delphi 4), so I think it's

Re: [fpc-pascal] Wrong assignment detected only run time without warning

2023-06-16 Thread Tomas Hajny via fpc-pascal
On 2023-06-16 13:46, Giuliano Colla via fpc-pascal wrote: Il 16/06/23 13:36, Peter B via fpc-pascal ha scritto: Yes. Assigning a 64bit integer to a 32bit one is fine as long as the range is within bounds. Range of a variable can only be checked at run time. I can understand that. But the

Re: [fpc-pascal] Free Pascal bindings for EyeLink C code (with a god-cast)

2023-06-14 Thread Tomas Hajny via fpc-pascal
On 14 June 2023 20:59:41 +0200, "Rafael Picanço via fpc-pascal" wrote: Hi Rafael, >I am trying to follow your advice and use units instead: > >const > EXTERNAL_DEV_NONE : TGetExButtonStatesFunction = Pointer(0); > >However I am receiving an error: > >Error: Incompatible types: got "Pointer"

Re: [fpc-pascal] Oberon-0

2023-04-19 Thread Tomas Hajny via fpc-pascal
On 2023-04-20 00:34, Ralf Quint via fpc-pascal wrote: On 4/19/2023 1:06 AM, Markus Greim via fpc-pascal wrote: . . A native Oberon0 to Propeller ASM compiler would be fine, but maybe it would be easier to write first an Oberon0 to PropForth compiler. What does Oberon and Forth have to do

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-18 Thread Tomas Hajny via fpc-pascal
On 2023-04-18 11:12, Elmar Haneke via fpc-pascal wrote: Just my comments on IRC-Channels. . . Thanks for your input, but as already suggested previously, everybody interested in this topic should preferably use the fpc-other mailing list to keep this one available for discussion related to

Re: [fpc-pascal] As I predicted

2023-04-14 Thread Tomas Hajny via fpc-pascal
On 2023-04-14 16:25, Steve Litt via fpc-pascal wrote: Hi all, As I predicted, here's what happened to me on #fpc: == Joanna sets ban on $a:stevelitt * You have been kicked from #fpc by Joanna (sorry i cant share a channel with you after what you

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-14 Thread Tomas Hajny via fpc-pascal
On 2023-04-14 09:43, Michael Van Canneyt via fpc-pascal wrote: Hi, . . I've been contacted as well by email. I received a similar story, and after reading it I believe she (she confirmed it is a female name) is sincere in her wish to keep the channel free from trolls, so it appears to me

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-13 Thread Tomas Hajny via fpc-pascal
On 13 April 2023 22:08:58 +0200, "Vojtěch Čihák via fpc-pascal" wrote: Hi, >I'm almost fourteen years on the forum and a few years less on mailing lists >and I never had a single problem. >I don't attend IRC so I can't say what's wrong there. >OTOH I read Joanna's comments on the forum and

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-13 Thread Tomas Hajny via fpc-pascal
On 2023-04-13 11:23, Jacob Kroon via fpc-pascal wrote: Hi Jacob, . . Ok, maybe this "Joanna" is on this mailing list and would care to elaborate more why I got banned ? The same "Joanna" also kicked me out of the channel a couple of days ago with the reason that "we don't allow lurkers",

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

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 16:14, Bart via fpc-pascal wrote: 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

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

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 11:14, Sven Barth wrote: Tomas Hajny via fpc-pascal schrieb am Di., 4. Apr. 2023, 09:51: . . If you read the documentation (wiki or the real documentation in PDF/HTML etc.) properly, you don't find there anything saying that constants declared locally within functions

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

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 09:43, Jacob Kroon wrote: Hi Jacob, You don't need to change "var" to "const" - if you want to ensure the variables to persist in between the function/procedure runs, you need to move them to the global level, i.e. outside of the functions/procedures. It is not advisable as a

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

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 08:16, Jacob Kroon via fpc-pascal wrote: Hi Jacob, . . But I suspect I have a new problem: With the old Pascal/MT+ compiler it would appear that local variables declared in functions/procedures have a life-time that spans the whole program, like a "static" declared variable in

Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-30 Thread Tomas Hajny via fpc-pascal
On 2023-03-30 10:08, Bo Berglund via fpc-pascal wrote: On Thu, 30 Mar 2023 10:02:49 +0200, Tomas Hajny via fpc-pascal wrote: . . I'd suggest trying to switch to external linking (for both versions) - that might help... Could you be more specific? I have never heard of such, I am just

Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-30 Thread Tomas Hajny via fpc-pascal
On 30 March 2023 9:36:35 +0200, Marco van de Voort via fpc-pascal wrote: >On 30-3-2023 07:38, Bo Berglund via fpc-pascal wrote: >> The problem seems to be that neither is a valid COFF file according to my Fpc >> (or Lazarus) in any case. Both generate the COFF error when reaching the >> linker

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

2023-03-28 Thread Tomas Hajny via fpc-pascal
On 2023-03-28 11:33, Karoly Balogh via fpc-pascal wrote: Hi, . . You might wanna consider this approach, because if units somehow end up cross-referencing each other, then you might run into difficulties restructuring the code to use Units. Also, it is possible to cross-reference units from

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

2023-03-28 Thread Tomas Hajny via fpc-pascal
On 2023-03-27 11:45, Jacob Kroon via fpc-pascal wrote: Hi, I have some old Pascal code that was compiled in a CPM environment using the Pascal/MT+ compiler from Digital Research. I'm trying to get this project to build in a modern environment, for a start using FreePascal. First, is anyone

Re: [fpc-pascal] Downloaded cross-compiler from Sourceforge - wiki incorrect?

2023-03-23 Thread Tomas Hajny via fpc-pascal
On 2023-03-23 09:25, Bo Berglund via fpc-pascal wrote: I tried to add a cross-compiler for Win32 to my existing Lazarus 2.2.4 installation on Windows 10 x64. . . Then opened Lazarus 2.2.4 with my project and changed project options as follows: Compiler_Options/Config_and_Target/Target

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

2022-12-31 Thread Tomas Hajny via fpc-pascal
Hello everybody, Could we get back on topic, please? Discussion of strengths and weaknesses of SQL and/or other database technologies and their history (especially if primarily focusing subjective feelings of different authors rather than use of these database technologies together with FPC)

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

2022-12-29 Thread Tomas Hajny via fpc-pascal
On 29 December 2022 13:31:57 +0100, Anthony Walter via fpc-pascal wrote: Hello Anthony, . . >I suggest you either brush up on these subjects or refrain from scolding >people on subjects with which you have no practical experience. You asked for feedback and you got it. Please, stop

Re: [fpc-pascal] Can't build single package

2022-11-03 Thread Tomas Hajny via fpc-pascal
On 2022-11-03 08:58, Luca Olivetti via fpc-pascal wrote: El 2/11/22 a les 17:06, Tomas Hajny via fpc-pascal ha escrit: I see. This means that you already have the prerequisites fulfilled in the source tree for Linux, but not for Windows. Start by issuing 'make rtl_all packages_all' in D

Re: [fpc-pascal] Can't build single package

2022-11-02 Thread Tomas Hajny via fpc-pascal
On 2022-11-02 16:40, Luca Olivetti via fpc-pascal wrote: El 2/11/22 a les 15:54, Tomas Hajny via fpc-pascal ha escrit: OK, the problem is that I installed the compiler with the windows installer and the makefile expects it to be in its tree (hence the "-n" and the &qu

Re: [fpc-pascal] Can't build single package

2022-11-02 Thread Tomas Hajny via fpc-pascal
On 2022-11-02 15:25, Luca Olivetti via fpc-pascal wrote: El 2/11/22 a les 9:37, Luca Olivetti via fpc-pascal ha escrit: IIRC I did it in the past but now: D:\fpc-3.2.2\packages\fcl-web>make C:/FPC/3.2.2/bin/i386-Win32/ppc386.exe fpmake.pp -n -Fu../../rtl -Fu../../packages/paszlib

Re: [fpc-pascal] Test Free Pascal program not compiling

2022-09-13 Thread Tomas Hajny via fpc-pascal
On 2022-09-12 21:12, Terry A. Haimann via fpc-pascal wrote: Hello Terry, I personally think it can't find the assembler. I did test this on my desktop and it compiled w/o error. No, but the installed assembler doesn't know the "softvfp" FPU type apparently specified in the compilation

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

2022-09-12 Thread Tomas Hajny via fpc-pascal
On 2022-09-12 21:41, Nikolay Nikolov via fpc-pascal wrote: On 9/10/22 17:57, James Richters via fpc-pascal wrote: Thanks for the suggestion I think the syntax should be: type myKeyEvent = IPTCKeyEvent; Var myShiftStatus : boolean; myShiftStatus := myKeyEvent.Shift; but I get IPTCKeyEvent not

[fpc-pascal] Fwd: Re: Cross-compiler for ARM64 on Windows available?

2022-06-25 Thread Tomas Hajny via fpc-pascal
). Tomas Original Message Subject: Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available? Date: 2022-06-25 14:07 From: Tomas Hajny To: FPC-Pascal users discussions On 2022-06-25 10:58, Wolfgang Hubert via fpc-pascal wrote: Hi Wolfgang, if you already have your FPC 3.2.2 in

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-25 Thread Tomas Hajny via fpc-pascal
On 2022-06-25 10:58, Wolfgang Hubert via fpc-pascal wrote: Hi Wolfgang, if you already have your FPC 3.2.2 installation, plus installation of an external package (LLVM). All of it rather feasible. Yes, you may possibly encounter some issues with the current port to this target

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-24 Thread Tomas Hajny via fpc-pascal
On 2022-06-24 09:02, Wolfgang Hubert via fpc-pascal wrote: Hi Wolfgang, thank you for your thoughts and suggestions on this topic. Tomas Hajny wrote: I may be wrong, but I believe that the original poster meant that he was using a "regular" (32-bit) version of WinXP on x86

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-23 Thread Tomas Hajny via fpc-pascal
On 2022-06-23 19:58, Travis Siegel via fpc-pascal wrote: There actually is a 64-bit version of xp, but it's not compatible with very much.  Apparently, it didn't have an emulator in it, so running 32-bit software wasn't something it did by default.  I never did figure out if it could be made to

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-22 Thread Tomas Hajny via fpc-pascal
On 2022-06-21 20:01, Sven Barth wrote: Tomas Hajny via fpc-pascal schrieb am Di., 21. Juni 2022, 18:08: Hi Sven, . . I just tried to follow the advice above. Compiling the cross-compiler (Win32 hosted) is no problem using the fullcycle target (obviously, I could build just the particular

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-21 Thread Tomas Hajny via fpc-pascal
On 2022-06-21 00:14, Pierre Muller via fpc-pascal wrote: Le 20/06/2022 à 23:53, Sven Barth via fpc-pascal a écrit : Am 20.06.2022 um 12:34 schrieb Wolfgang Hubert via fpc-pascal: Hi Pierre (and others ;-) ), . . Windows on AArch64 is currently only supported in main thus you need to

Re: [fpc-pascal] Compiler flag define or $IFOPT for optimizations

2022-06-03 Thread Tomas Hajny via fpc-pascal
, then the suggested approach should fit well, IMHO. Tomas On 28.05.22 14:34, Tomas Hajny via fpc-pascal wrote: On 2022-05-28 13:44, Benito van der Zander via fpc-pascal wrote: Hi, I want to show how my program was compiled. Now I have string like "FPC3.2.2 i386-Linux R+C+" from compil

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

2022-05-31 Thread Tomas Hajny via fpc-pascal
On 2022-05-31 11:22, Liam Proven via fpc-pascal wrote: On Tue, 31 May 2022 at 04:12, Steve Litt via fpc-pascal wrote: A truly great language would be Turbo Pascal 5.5 (with OOP) plus function/procedure references. Oberon? https://en.wikibooks.org/wiki/Oberon Please, everybody - this

Re: [fpc-pascal] Compiler flag define or $IFOPT for optimizations

2022-05-28 Thread Tomas Hajny via fpc-pascal
On 2022-05-28 13:44, Benito van der Zander via fpc-pascal wrote: Hi, I want to show how my program was compiled. Now I have string like "FPC3.2.2 i386-Linux R+C+" from compiler := 'FPC' + {$INCLUDE %FPCVERSION%} + ' ' + {$INCLUDE %FPCTargetCPU%}+'-'+{$INCLUDE %FPCTargetOS%}+ ' ' + {$IfOpt

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

2022-04-13 Thread Tomas Hajny via fpc-pascal
On 2022-04-13 00:34, denisgolovan via fpc-pascal wrote: Hi Denis, I've been maintaining a set of private patches for some quite old FPC revision for some years. . . My first trouble is initialization of dynamic arrays with constant arrays. It looks like simply building one version of

Re: [fpc-pascal] converting to UTF8

2022-03-24 Thread Tomas Hajny via fpc-pascal
On 2022-03-24 20:47, Santi via fpc-pascal wrote: 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"? Mattias meant that comments were the only place where information about use of CP1252 was

Re: [fpc-pascal] Putting Delimited text into a StringList

2022-02-07 Thread Tomas Hajny via fpc-pascal
On 2022-02-07 13:20, James Richters via fpc-pascal wrote: I'm trying to use TCSVDocument, I have: Uses Math,sysutils,Classes,CSVReadWrite; That seems to be fine, But I get an error 1D.pas(18,17) Error: Identifier not found "TCSVDocument" On a line: Var CSVData : TCSVDocument; Do I

Re: [fpc-pascal] Make clean error when building fpc 3.2.2 from sources

2021-11-22 Thread Tomas Hajny via fpc-pascal
On 2021-11-22 16:21, Jonas Maebe via fpc-pascal wrote: On 22/11/2021 16:02, Bo Berglund via fpc-pascal wrote: This is what happens when I execute the first make command inside the fpc source dir: ~/devel/fpc/3.2.2$ make clean make: -iVSPTPSOTO: Command not found /usr/bin/rm -f

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

2021-09-16 Thread Tomas Hajny via fpc-pascal
source file is in UTF-8, you need to let the compiler know about this. You can do so by using the compiler option -Fcutf8 (or by using the BOM, but the explicit option is the safest). Tomas On 15.09.2021 16:53, Tomas Hajny via fpc-pascal wrote: On 2021-09-15 15:08, Abuy via fpc-pascal wrote

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

2021-09-15 Thread Tomas Hajny via fpc-pascal
On 2021-09-15 15:08, Abuy via fpc-pascal wrote: Instead of cyrillic characters there some garbage in Windows event viewer. Have tried AnsiString with Windows-1251 code page (type StringCP1251 = type AnsiString(1251)) but this does not work. What works is RawByteString variable with the following

Re: [fpc-pascal] https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ : Missing install.sh

2021-07-07 Thread Tomas Hajny via fpc-pascal
On 2021-07-06 22:37, Jean Pierre CASSOU via fpc-pascal wrote: https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ Missing install.sh This file is included in the fpcbuild package (either zip, or tar.gz), in particular in subdirectory "install". Apart from that - I assume that

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-17 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 23:49, Jean SUZINEAU via fpc-pascal wrote: My best score is 67 kb after strip -s with the code below ... ;-) Of course it will not work on every  version of Windows. program uptime; function GetTickCount64: QWord; stdcall; external 'kernel32.dll'; function _2d( _i: Integer):

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 11:38, Marco van de Voort via fpc-pascal wrote: Op 2021-06-16 om 11:21 schreef Tomas Hajny via fpc-pascal:  Or if they contain $R inclusions. ...or many other things which may not be smartlinked, either because it is not possible, or because the compiler and/or linker cannot do

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 10:58, Marco van de Voort via fpc-pascal wrote: Op 2021-06-16 om 09:16 schreef Mattias Gaertner via fpc-pascal: On Wed, 16 Jun 2021 08:57:13 +0200 Bo Berglund via fpc-pascal wrote: If I by habit add a bunch of often used units to the uses clause will that affects the size of

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 09:16, Mattias Gaertner via fpc-pascal wrote: On Wed, 16 Jun 2021 08:57:13 +0200 Bo Berglund via fpc-pascal wrote: If I by habit add a bunch of often used units to the uses clause will that affects the size of the compiled application even if they are not in fact used? Yes, if

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-18 Thread Tomas Hajny via fpc-pascal
On 2021-05-18 18:01, Bo Berglund via fpc-pascal wrote: On Tue, 18 May 2021 16:20:29 +0100, Henry Vermaak via fpc-pascal wrote: On Tue, 18 May 2021 at 11:50, Sven Barth via fpc-pascal wrote: I don't think we need to mention any specific clients (and why did your list not include Filezilla?

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-18 Thread Tomas Hajny via fpc-pascal
On 2021-05-18 10:38, Michael Van Canneyt via fpc-pascal wrote: On Tue, 18 May 2021, Graeme Geldenhuys via fpc-pascal wrote: On 17/05/2021 3:13 pm, Karoly Balogh via fpc-pascal wrote: I'd actually keep FTP enabled, as it doesn't hurt anything and it's still a thing for retro downloads.

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-14 Thread Tomas Hajny via fpc-pascal
On 2021-05-15 00:25, Bo Berglund via fpc-pascal wrote: On Wed, 12 May 2021 12:42:14 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: So right now I try to read up on how to actually handle the mime object here... And I had an additional question: Does Synapse throw exceptions when

Re: [fpc-pascal] [fpc-devel] Nested function closures

2021-04-29 Thread Tomas Hajny via fpc-pascal
On 2021-04-29 09:00, Mattias Gaertner via fpc-pascal wrote: On Thu, 29 Apr 2021 07:52:19 +0200 Sven Barth via fpc-pascal wrote: [...] You completely ignored my first point, which in this case is the much more significant one: Pascal does not support type inference. FPC does not. Delphi

Re: [fpc-pascal] Interruption handling on i8086

2021-04-10 Thread Tomas Hajny via fpc-pascal
On 2021-04-09 19:56, Guillermo via fpc-pascal wrote: Hi, > I'm doing DOS development for fun and, after installing the compiler > (was quite hard), I'm having problems handling interrupts. > > I started with keyboard and it doesn't work. The handler declaration: > > procedure DOS_KbdHandler;

Re: [fpc-pascal] Directory Tree

2021-04-06 Thread Tomas Hajny via fpc-pascal
On 2021-04-06 14:43, James Richters wrote: Is there any documentation or a sample program for TDirListBox? I tried doing a search but only found a page that showed it's functions and procedures, but no real explanation on what they are supposed to do. The functionality is used within the text

Re: [fpc-pascal] Directory Tree

2021-04-06 Thread Tomas Hajny via fpc-pascal
On 2021-04-06 12:29, James Richters via fpc-pascal wrote: Does FPC include any tools to display a directory tree, similar to the way files and folders are normally displayed, but I want to make my own custom entries. Have the branches expand and collapse etc.. It doesn't have to be graphical,

Re: [fpc-pascal] SinclairQL (M68K) Port

2021-03-22 Thread Tomas Hajny via fpc-pascal
On 2021-03-22 12:35, Norman Dunbar via fpc-pascal wrote: > On 21/03/2021 12:07, Tomas Hajny via fpc-pascal wrote: Hi Norman, >> The page https://wiki.freepascal.org/System_unit_structure (referred >> to from the 'RTL development articles' appearing on the 'FPC >> develo

Re: [fpc-pascal] SinclairQL (M68K) Port

2021-03-21 Thread Tomas Hajny via fpc-pascal
On 2021-03-21 10:23, Karoly Balogh via fpc-pascal wrote: On Sat, 20 Mar 2021, Norman Dunbar via fpc-pascal wrote: Hi, . . It would be helpful to beginners like me, trying to look around and fix/implement stuff. I've been all over the Wiki and found this page,

Re: [fpc-pascal] Unicode chars losing information

2021-03-09 Thread Tomas Hajny via fpc-pascal
On 2021-03-09 09:46, Graeme Geldenhuys via fpc-pascal wrote: On 09/03/2021 1:44 am, Tomas Hajny via fpc-pascal wrote: UnicodeString may be used in a program simply because the included unit has it used in its interface. That may be the case even if there's no use of characters outside of US

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Tomas Hajny via fpc-pascal
On 2021-03-08 21:36, Martin Frb via fpc-pascal wrote: . . In the example the index access should have returned a single codeunit, which was known to be a complete codepoint. As far as I understand the unexpected part was, that the unicode string did not contain the content of the string

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Tomas Hajny via fpc-pascal
On 2021-03-08 11:59, Adriaan van Os via fpc-pascal wrote: Hi, adriaan% cat uniquizz-utf8.pas {$codepage utf8} program uniquizz; var chars: UnicodeString; begin chars := '⌘ key'; writeln(chars); writeln(chars[1]); writeln( 'size ', sizeOf( chars)); writeln( 'length ', length(

Re: [fpc-pascal] Questions from Semi-Beginner

2021-02-20 Thread Tomas Hajny via fpc-pascal
On 2021-02-20 17:15, Tomas Hajny wrote: On 2021-02-20 13:49, Sven Barth via fpc-pascal wrote: CSlemaker via fpc-pascal schrieb am Sa., 20. Feb. 2021, 09:48: Hello everybody, Please, note that the original poster (in Cc: now, so that he doesn't miss the response from Sven below) isn't

Re: [fpc-pascal] Questions from Semi-Beginner

2021-02-20 Thread Tomas Hajny via fpc-pascal
On 2021-02-20 13:49, Sven Barth via fpc-pascal wrote: CSlemaker via fpc-pascal schrieb am Sa., 20. Feb. 2021, 09:48: Hello everybody, Please, note that the original poster (in Cc: now, so that he doesn't miss the response from Sven below) isn't subscribed to fpc-pascal, make sure to

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-26 Thread Tomas Hajny via fpc-pascal
On 2020-12-26 15:45, gabor via fpc-pascal wrote: W dniu 2020-12-22 o 04:57, Nikolay Nikolov via fpc-pascal pisze: . . Very interesting. But in a future version of the FV (or other TUI framework) apart from migrating from objects to classes, using component streaming, collections, etc... it

Re: [fpc-pascal] Selecting Records with a variable

2020-12-20 Thread Tomas Hajny via fpc-pascal
On 2020-12-20 11:56, Sven Barth via fpc-pascal wrote: Am 20.12.2020 um 05:26 schrieb Jean SUZINEAU via fpc-pascal: I know you don't like objects, but maybe something like : Using modeswitch AdvancedRecords that also works with record types. And I'd suggest a case-statement as well.

Re: [fpc-pascal] callback from c with varargs

2020-12-20 Thread Tomas Hajny via fpc-pascal
On 2020-12-20 14:00, Jonas Maebe via fpc-pascal wrote: On 20/12/2020 13:01, Luca Olivetti via fpc-pascal wrote: El 19/12/20 a les 23:15, Jonas Maebe via fpc-pascal ha escrit: It is indeed not possible to implement a function with C varargs in FPC. I was afraid that's the answer :-( as an

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-02 Thread Tomas Hajny via fpc-pascal
On 2020-12-02 16:01, LacaK via fpc-pascal wrote: Dňa 2.12.2020 o 13:55 Tomas Hajny via fpc-pascal napísal(a): On 2020-12-01 11:39, Ladislav Karrach via fpc-pascal wrote: Because MyConst1 is not an *untyped* constant. Only untyped constants can be used in constant expressions (a pointer

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-02 Thread Tomas Hajny via fpc-pascal
On 2020-12-01 11:39, Ladislav Karrach via fpc-pascal wrote: Because MyConst1 is not an *untyped* constant. Only untyped constants can be used in constant expressions (a pointer to something can be considered an untyped constant). The following might work though I did not test it: === code

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-20 Thread Tomas Hajny via fpc-pascal
On 2020-11-20 09:32, Graeme Geldenhuys via fpc-pascal wrote: On 20/11/2020 7:04 am, Sven Barth via fpc-pascal wrote: a way to convert the option list to TConsoleApplication's argument handling so that one doesn't have to declare that twice. Oh, I really like that idea. I'll make sure to

Re: [fpc-pascal] CRT unit and bug #32558

2020-11-06 Thread Tomas Hajny via fpc-pascal
On 2020-11-06 23:54, Ched via fpc-pascal wrote: Dear All, I have some difficulties using the crt unit. For what I can see, https://bugs.freepascal.org/view.php?id=32558 could well be the answer, specialy a call like SetUseACP(False); . At the end of the bug report, it is said that the crt unit

Re: [fpc-pascal] basic question on begin, end;

2020-09-23 Thread Tomas Hajny via fpc-pascal
On 2020-09-22 14:46, dano none via fpc-pascal wrote: Hello, I have a basic shuffle routine. I put being, end statements in the outer loop for clarification. It ended up producing random results. Commenting out the begin, end combination allows the code to run as expected. My code is below,

Re: [fpc-pascal] -Fu unit search path and network paths

2020-09-21 Thread Tomas Hajny via fpc-pascal
On 2020-09-21 14:44, Marco van de Voort via fpc-pascal wrote: Op 2020-09-21 om 13:44 schreef LacaK via fpc-pascal: are supported in -Fu (unit search path) networks paths? i.e. -Fu\\server\share -Fu\\server\share\path ? Correction: unit cannot be found only if it is placed in "share root"

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 16:09, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: application (let's say notepad.exe) will result in garbage. I don't say that it is necessarily bad, but it should be documented at least if we want to keep it that way. I would definitely

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 16:09, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: application (let's say notepad.exe) will result in garbage. I don't say that it is necessarily bad, but it should be documented at least if we want to keep it that way. I would definitely

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 14:51, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: opened: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS} { if no codepage is yet assigned then assign default ansi codepage } TextRec(t).CodePage:=TranslatePlaceholderCP(TextRec(t).CodePage

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 14:20, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-14 13:39, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 13:39, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal <mailto:

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-13 Thread Tomas Hajny via fpc-pascal
On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>> schrieb am Sa., 12. Sep. 2020, 17:47: . . While performing s

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-12 Thread Tomas Hajny via fpc-pascal
On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal > schrieb am Sa., 12. Sep. 2020, 17:47: > All the doubts, questions, and discussions prove that current

Re: [fpc-pascal] Fpc make questions...

2020-09-11 Thread Tomas Hajny via fpc-pascal
On 2020-09-11 21:51, Bo Berglund via fpc-pascal wrote: I am not very informed about how make works when building fpc installations, I have just used commands I have gathered online and it has worked... Now I would like to know: 1) Does make clean inside the fpc source dir erase ALL of the

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 17:59, Mattias Gaertner via fpc-pascal wrote: On Wed, 09 Sep 2020 17:44:11 +0200 Tomas Hajny via fpc-pascal wrote: . . The implicit conversion is explicitly expected by the user in this case if I understand it correctly (source in CP1250), right? If you mean the &quo

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 17:37, Mattias Gaertner via fpc-pascal wrote: On Wed, 09 Sep 2020 17:25:09 +0200 Tomas Hajny via fpc-pascal wrote: On 2020-09-09 13:51, LacaK via fpc-pascal wrote: [...] A simple question - is TLabel.Caption declared as Utf8String (I don't use Lazarus)? _Then_ it should work

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 17:30, Bart via fpc-pascal wrote: On Wed, Sep 9, 2020 at 5:25 PM Tomas Hajny via fpc-pascal wrote: A simple question - is TLabel.Caption declared as Utf8String No. No wonder that the implicit conversion doesn't work then. Adding an explicit conversion would be another

  1   2   3   4   5   6   7   8   >