[fpc-pascal] Pointer to a const char

2013-11-04 Thread Alexander
How can I describe a "pointer to a constant char" in FreePascal? For example this C function: int some_func(const char *arg, ...); My guess in FreePascal is this(with ctypes unit): function some_func(const arg: pcchar): cint; cdecl; external; A constant argument to a function. I'm not sure, i

Re: [fpc-pascal] buffered filestream

2012-06-10 Thread Alexander Shishkin
10.06.2012 18:40, Mattias Gaertner пишет: I want to pass the stream to a binary reader, which skips big parts of the stream. It can seek backwards and the files can be several GB, so I need the int64 read/write/seek. Do you mean buffered random access (smth like disk access in DBMS)?

Re: [fpc-pascal] buffered filestream

2012-06-10 Thread Alexander Shishkin
10.06.2012 20:20, Mattias Gaertner пишет: On Sun, 10 Jun 2012 19:08:40 +0400 Alexander Shishkin wrote: 10.06.2012 18:40, Mattias Gaertner пишет: I want to pass the stream to a binary reader, which skips big parts of the stream. It can seek backwards and the files can be several GB, so I

Re: [fpc-pascal] Re: asm statement

2012-06-12 Thread Alexander Shishkin
12.06.2012 23:23, Rainer Stratmann пишет: Am Tuesday 12 June 2012 18:44:20 schrieb leledumbo: What happens if there is only the end; statement without the used registers? The compiler couldn't save the values in the registers prior to the asm block. If they contain intermediate result, they m

Re: [fpc-pascal] std::map equivalent?

2012-06-13 Thread Alexander Shishkin
12.06.2012 17:38, Xiangrong Fang пишет: Hi, Is there a std::map equivalent for free pascal? Thanks, Shannon -- ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal gmap.TMap from fcl

[fpc-pascal] Question on Calling Conventions (for: PascalScript on Win x64)

2012-09-05 Thread Alexander Hofmann
Hi there. This is a cross-post (cross-mail ?) to http://www.lazarus.freepascal.org/index.php/topic,17978.0.html as I got the hint there that it might be better to ask on the list instead of in the forum, at least concerning the calling conventions - but I'll ask the whole lot, anyway; I hope that'

Re: [fpc-pascal] Question on Calling Conventions (for: PascalScript on Win x64)

2012-09-05 Thread Alexander Hofmann
Am 05.09.2012 20:18, schrieb Florian Klämpfl: > Am 05.09.2012 18:27, schrieb Alexander Hofmann: > o Called from FPC: rcx: 0 (nil), rdx: Class Reference, r8: Value of > aOwner o Called from Script: rcx: Class Reference, rdx: 1 (!?), r8: > Value of aOwner (at least so it seems) > >

Re: [fpc-pascal] Question on Calling Conventions (for: PascalScript on Win x64)

2012-09-06 Thread Alexander Hofmann
Am 06.09.2012 09:27, schrieb Carlo Kok: > Op 6-9-2012 02:43, Martin schreef: >> On 06/09/2012 01:28, Alexander Hofmann wrote: >>> You were right of course! I could have sweared I looked over the >>> differences of x86 and x64 numerous times, but.. .well. >>> &

Re: [fpc-pascal] Constant of 2D array

2012-09-11 Thread Alexander Shishkin
11.09.2012 16:51, Felipe Monteiro de Carvalho пишет: Hello, Can I write constants of a 2D array? I am trying to convert some C++ code which uses this ... so far I tryed: const number_return_map: array[0..7][0..7] of U8 = ( ( 15, 14, 13, 12, 11, 10, 9, 8 ), ( 14, 0, 1, 3, 6, 10, 10,

[fpc-pascal] Problem with threads and cwstrings

2008-06-17 Thread Alexander Bauer
Hi, i have a problem when i use cwstrings together with threads on linux. I made a simple program which create threads in an endless loop. Every thread only does a sleep(1) and then finish. Without 'cwstrings' everything works fine. But when i include 'cwstrings' the program eats more and more

[fpc-pascal] Wrong Time from Now() or Time()

2008-12-03 Thread Alexander Bauer
I have a strange problem with fpc 2.2.2 on Ubuntu Linux. The function Now(); did not return the right time ?!? It returns the time UTC - 6 hours. Any suggestions ? br, Alex ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.free

Re: [fpc-pascal] Wrong Time from Now() or Time()

2008-12-03 Thread Alexander Bauer
Valdas Jankūnas schrieb: Alexander Bauer rašė: I have a strange problem with fpc 2.2.2 on Ubuntu Linux. The function Now(); did not return the right time ?!? It returns the time UTC - 6 hours. Any suggestions ? br, Alex try GetTime or GetLocalTime from SysUtils unit. It's alway

Re: [fpc-pascal] Wrong Time from Now() or Time() => [SOLVED]

2008-12-09 Thread Alexander Bauer
order! br, Alex vince coen schrieb: Hi; Have you checked what time zone you have set up? V. On Thursday 04 December 2008, you wrote: Valdas Jankūnas schrieb: Alexander Bauer rašė: I have a strange problem with fpc 2.2.2 on Ubuntu Linux. The function Now(); did not return the

[fpc-pascal] Looking for remote working freelancer for a C++ to FPC porting project

2009-10-09 Thread Alexander Grau
gards Alexander Grau Grau GbR Hardware & Software Solutions Eschenweg 12 32609 Huellhorst Germany www.grauonline.de Tel: +49 (0) 5741 2301259 Fax: +49 (0) 5741 235530 E-Mail: a...@grauonline.de ___ fpc-pascal maillist - fpc-pascal@lists.freepascal

Re: [fpc-pascal] How to set LCL widgetset for my project?

2009-10-27 Thread Alexander Grau
nd line? I would also like to know more about in which file is the option given in the LCL sources. Thank you for your response. Hello, I have not done this myself for Qt (but for Carbon), but this might work: Compiling Lazarus QT LCL: | make clean lcl LCL_PLATFORM=qt |Regards,

Re: [fpc-pascal] How to set LCL widgetset for my project?

2009-10-27 Thread Alexander Grau
Windows. As Graeme suggested in his poisting, the easiest to find all required parameters is to make a new project in Lazarus and look for the command line parameters in the compiler options dialog. Regards, Alexander Mac OSX example- LAZPATH=../../lazarus/lazarus echo

Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-14 Thread Alexander Grau
ndows and Mac. The Windows version is easy (below), the Mac version is long (400 lines). If someone would like to add a PlaySoundFile API to LCL/FPC, drop me a note and we will donate the Mac code for it :-) ... Regards, Alexander uses windows, mmsystem; procedure PlaySoundFile(filename: s

Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-15 Thread Alexander Grau
Graeme Geldenhuys schrieb: On 14/06/2010, Alexander Grau wrote: If someone would like to add a PlaySoundFile API to LCL/FPC, drop me a note and we will donate the Mac code for it :-) ... Thanks for that. A quick test removing the SND_ASYNC option plays multiple sound files in quick

Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-15 Thread Alexander Grau
dmitry boyarintsev schrieb: On Tue, Jun 15, 2010 at 11:37 AM, Alexander Grau wrote: This is not the most elegant (or easiest) solution, however it has no dependencies to any libraries :) The solution still depends upon decompression libraries. However, they can be statically linked

[fpc-pascal] writeln: FPC runtime race conditions in external C threads

2010-07-12 Thread Alexander Grau
27;Threading Pitfalls') that will discuss these and other issues related to threading and I welcome all explanations on this so I can better understand this problem! :-) Thanks, Alexander ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] writeln: FPC runtime race conditions in external C threads

2010-07-12 Thread Alexander Grau
sible? Michael. On Mon, 12 Jul 2010, Alexander Grau wrote: Hello, While using an external C framework (Mac OS X, discrecording OS framework, FPC 2.4), I noticed that my FPC console app crashes when I use writeln's in both C threads (callbacks). Example: Two FPC functions that are call

Re: [fpc-pascal] writeln: FPC runtime race conditions in external C threads

2010-07-12 Thread Alexander Grau
Am 12.07.2010 um 18:17 schrieb Jonas Maebe: On 12 Jul 2010, at 13:24, Michael Van Canneyt wrote: Basically, any heap memory access and standard pascal I/O are forbidden in threads started outside FPC, because the necessary thread structures are not initialized correctly. I think that I

Re: [fpc-pascal] writeln: FPC runtime race conditions in external C threads

2010-07-12 Thread Alexander Grau
Am 12.07.2010 um 18:17 schrieb Jonas Maebe: On 12 Jul 2010, at 13:24, Michael Van Canneyt wrote: Basically, any heap memory access and standard pascal I/O are forbidden in threads started outside FPC, because the necessary thread structures are not initialized correctly. I think that I

Re: [fpc-pascal] writeln: FPC runtime race conditions in external C threads

2010-07-12 Thread Alexander Grau
Am 12.07.2010 um 22:31 schrieb Jonas Maebe: Alexander Grau wrote on Mon, 12 Jul 2010: Am 12.07.2010 um 18:17 schrieb Jonas Maebe: On 12 Jul 2010, at 13:24, Michael Van Canneyt wrote: Basically, any heap memory access and standard pascal I/O are forbidden in threads started outside FPC

Re: [fpc-pascal] writeln: FPC runtime race conditions in external C threads

2010-07-13 Thread Alexander Grau
Am 12.07.2010 um 22:58 schrieb Jonas Maebe: Alexander Grau wrote on Mon, 12 Jul 2010: Am 12.07.2010 um 22:31 schrieb Jonas Maebe: I forgot to mention: before this works, you have to create at least one thread using the FPC RTL in order to initialise the threading subsystem. It can be

Re: [fpc-pascal] Delphi's anonymous functions in Free Pascal

2011-10-19 Thread Alexander Shishkin
19.10.2011 12:16, Sven Barth пишет: E.g. TIntegerFunc = reference to function: Integer; procedure SomeOtherProc(aFunc: TIntegerFunc); ... procedure Foo; var x: Integer; begin x := 42; SomeOtherProc(function: Integer; begin Result := x; end;); end; I haven't tested that, but from the descript

Re: [fpc-pascal] Delphi's anonymous functions in Free Pascal

2011-10-21 Thread Alexander Shishkin
18.10.2011 0:53, Andrew Pennebaker пишет: Does Free Pascal have anonymous functions that you can pass around, e.g. to a sort(compare : function, arr : array) function? anonymous functions = closures = lambdas are part of functional paradigm. object pascal itself is not functional language. Bu

Re: [fpc-pascal] How are Assigned, Free, Nil and Destroy related?

2011-10-21 Thread Alexander Shishkin
22.10.2011 10:20, Felipe Monteiro de Carvalho пишет: I understand Assigned as being the same as<> nil, so Assigned(Object) = Object<> nil I vaguely remember that it could be safer in some corner case, but I don't remember ever meting that. Method pointers? __

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-05 Thread Alexander Shishkin
05.11.2011 22:42, Bernd пишет: 2011/10/25: targethread.queue( procedure(targetobject:ttargetobject;a:integer;b:someobject;c:string) begin targetobject.destinationprocedure(a,b,c); end; Note how common this looks compared to the original. One point i

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-05 Thread Alexander Shishkin
06.11.2011 1:46, Michael Van Canneyt пишет: On Sat, 5 Nov 2011, Bernd wrote: 2011/10/25 : targethread.queue( procedure(targetobject:ttargetobject;a:integer;b:someobject;c:string) begin targetobject.destinationprocedure(a,b,c); end; Note how common thi

Re: [fpc-pascal] Free Pascal 2.6.0rc1 released

2011-11-05 Thread Alexander Shishkin
06.11.2011 3:47, Luiz Americo Pereira Camara пишет: On 5/11/2011 20:27, Marco van de Voort wrote: Downloads are available at the FTP server at: ftp://freepascal.stack.nl/pub/fpc/beta/2.6.0-rc1/ Cant download 550 /pub/fpc/beta/2.6.0-rc1/: Permission denied. Luiz

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-06 Thread Alexander Shishkin
06.11.2011 15:53, Florian Klämpfl пишет: Am 05.11.2011 22:58, schrieb Alexander Shishkin: 06.11.2011 1:46, Michael Van Canneyt пишет: On Sat, 5 Nov 2011, Bernd wrote: 2011/10/25: targethread.queue( procedure(targetobject:ttargetobject;a:integer;b:someobject;c:string) begin

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-06 Thread Alexander Shishkin
06.11.2011 18:13, dmitry boyarintsev пишет: On Sun, Nov 6, 2011 at 8:00 AM, Alexander Shishkin wrote: OK, agreed, this is more readable than Delphi syntax. But ... 1) If we implement lamdas is FPC we will have to support Delphi syntax. Hi-jacking, the thread, and again should FPC chase

Re: [fpc-pascal] various ways of passing a class instance as a parameter

2011-11-15 Thread Alexander Shishkin
15.11.2011 13:33, Graeme Geldenhuys пишет: Hi, What exactly is the difference (if any) between the parameter modifier when you pass a class instance to a procedure? I your example there is no difference, except that "var" could be ~0.01% slower _

Re: [fpc-pascal] various ways of passing a class instance as a parameter

2011-11-17 Thread Alexander Shishkin
15.11.2011 14:00, Graeme Geldenhuys пишет: This one confused me a bit. I thought the whole object would be read-only, but in fact it is just the AClass instance pointer which cannot be modified. The properties of AClass are still read-write. Perhaps it will be good to add support for const

[fpc-pascal] Re: TProcess questions

2006-10-03 Thread Alexander Todorov
Can you add the following to TProcess instead of using the CommandLine property: example: property ProcessName: String - the process to be executed property Params : TStringList - list of command line params to be passed to the process Why should quote characters be stripped as it is in the curre

[fpc-pascal] Re: TProcess questions

2006-10-03 Thread Alexander Todorov
Marco van de Voort wrote: > Can you add the following to TProcess instead of using the CommandLine property: > example: > property ProcessName: String - the process to be executed > property Params : TStringList - list of command line params to be > passed to the process > > Why should quote ch

[fpc-pascal] Re: TProcess questions

2006-10-03 Thread Alexander Todorov
Adrian Maier wrote: It seems nice to have a way of specifying parameters like that (in which case I assume that strings given will be passed as-they-are). Another option is to use escaping for quote characters (and maybe some others) when specifying the TProcess.CommandLine property. __

[fpc-pascal] Variant record types in Sockates unit.

2006-10-04 Thread Alexander Todorov
ng code? I have tried working with sockets using either of the fields (with or without sin_ prefix) and of course it works? Why is it there I am wondering? Greetings Alexander. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

[fpc-pascal] more Variant thoughts (was: Variant record types in Sockates unit)

2006-10-04 Thread Alexander Todorov
I made the simple test below: program project1; {$ifdef fpc} {$mode objfpc}{$H+} {$endif} {$apptype console} type TTagVariant = record AlwaysThere : Integer; case Flag : Boolean of false: (false_1, false_2 : Byte); true : (true_1: Word); end; var V : TTagVariant; beg

[fpc-pascal] Re: fpc-pascal Digest, Vol 26, Issue 9

2006-10-04 Thread Alexander Todorov
Michael Van Canneyt wrote: > 1) If the Flag field is set to true and the programmer uses field from > the variant part which is declared in the false section, should there > be a run time error or not? No. No checking is performed on this. > Although it will be slowly should the compiler check

[fpc-pascal] Using FPC as a scripting engine

2006-10-11 Thread Alexander Todorov
come. Please share your opinion. Thanks! Alexander. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Using FPC as a scripting engine

2006-10-13 Thread Alexander Todorov
On 10/11/06, Alexander Todorov <[EMAIL PROTECTED]> wrote: Hello list, currently I am using RemObjects Pascal Script as a scripting language for a project of mine. All scripts are simple programs that use "API" exported from the main program. They have and some global variables

[fpc-pascal] Re: Using FPC as a scripting engine

2006-10-16 Thread Alexander Todorov
On Fri, 13 Oct 2006 12:45:55 +0200 (CEST) Michael Van Canneyt wrote: > There was no response to my first e-mail so here are some examples of > what I want to do: > > http://www.codeproject.com/csharp/runtimecompiling.asp > http://developer.apple.com/documentation/mac/IAC/IAC-334.html I find this

[fpc-pascal] FPC 2.0.2 vs 2.0.4 xmlread

2006-10-24 Thread Alexander Todorov
de is wrong? Second thing that I noticed: The compiler gives error when calling ReadXMLFile prefixed with the unit name. Thanks! Alexander. xmltest.tar.bz2 Description: BZip2 compressed data ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] FPC 2.0.2 vs 2.0.4 xmlread

2006-10-24 Thread Alexander Todorov
Michael Van Canneyt wrote: XML is not in UTF-8. What do you mean by that? I don't understand. If you delete the line and save in a text file the "file" command says: UTF-8 Unicode text, if opened with web browser (e.g. Firefox) encoding is also shown as UTF-8. Opening the file with mcview in

[fpc-pascal] FPC hackers contest [was: Eye Candy Contest]

2006-11-01 Thread Alexander Todorov
nd any other language) too. Do FPC needs a hacker style programming contest in order to show that one can write ugly code in Pascal ??? Anybody interested in fpc-hackers mailing list where people can discuss non standard ways of doing things? Alexander _

Re: [fpc-pascal] Progress Bar in different widget sets

2006-11-03 Thread Alexander Todorov
On Fri, 3 Nov 2006 00:43:13 +0200 Graeme Geldenhuys wrote: I just implemented a basic TProgressBar widget for fpGUI and wanted to know if that Gtk progress bar feature (running left and right repeatedly) is something people actually use in applications and worth the time implementing in fpGUI.

[fpc-pascal] Re: Threads

2006-12-12 Thread Alexander Todorov
Date: Tue, 12 Dec 2006 10:04:48 +0100 From: "Carsten Bager" <[EMAIL PROTECTED]> On the Arm Linux platform I am using a uLibC library instead of the normal C library (I do not think that this is the problem but ??) . How do you linked your binary to uLibC instead of standard libC ? You were cr

[fpc-pascal] function Copy is inconsistent with Delphi

2007-01-16 Thread Alexander Todorov
Hello, i am converting a big Delphi project a part of uses a lexical parser. It is dependent on the Copy function which in Delphi is declared: function Copy(S; Index, Count: Integer): string; and in FPC it is: function Copy(const s: string; FromPosition, ToPosition : integer): String; Why the

[fpc-pascal] Why this code fails

2007-01-16 Thread Alexander Todorov
Hello, This code compiles with 2.0.4 but gives runtime error 231 . program project1; {$mode objfpc}{$H+} uses Variants; var V : Variant; S : String = 'test '; begin V := 42; writeln(V); S := S + V; // fails here writeln(S); end. the output is: [EMAIL PROTECTED]:~/temp/copy$ ./proj

Re: [fpc-pascal] Why this code fails

2007-01-17 Thread Alexander Todorov
to look more like Perl. Thanks to all for the reply. Alexander. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] PascalScript - possible bug when using with FreePascal

2007-01-18 Thread Alexander Todorov
output is: [EMAIL PROTECTED]:~/temp$ ./project1 1 2 while it should be: [EMAIL PROTECTED]:~/temp$ ./project1 1 MyFunc 2 I am using PascalScript from svn sources. Have anyone used PascalScript with FPC ? Any advice / work around is welcome. Greetings, Alexander project1.lpr Description

[fpc-pascal] Inline and defines

2007-01-23 Thread Alexander Todorov
mpiler does not generate any code? Any explanation and/or comments are welcome. Greeting to all. Alexander. program test; {$inline on} procedure MyProc; inline; begin {$IFDEF MORE_CODE} writeln('MIDDLE'); {$ENDIF} end; begin writeln('START'); MyProc; writ

Re: [fpc-pascal] Inline and defines

2007-01-24 Thread Alexander Todorov
features. Greetings. Alexander ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] SIGSEGV unknown reason

2007-01-30 Thread Alexander Todorov
Hello, I have a program written in Delphi and now it is compiled with FPC 2.0.4 and running on Linux. I am having troubles to find what is causing it to break. The error I get is EAccessViolation. A short gdb backtrace is provided below. What makes me puzzle is SYSTEM_RECORDRTTI. Program receive

[fpc-pascal] Sockets IO speed

2007-02-01 Thread Alexander Todorov
x27;s input/output will be faster by a large factor. [ skip ] Does FPC use such buffer when doing Sockets.Send/Sockets.Recv ? Where do I have to look if I want to optimize speed? Thanks. Alexander ___ fpc-pascal maillist - fpc-pascal@lists.freepasc

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-01 Thread Alexander Grotewohl
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 th

Re: [fpc-pascal] Prorammatically sending file using HTTP POST?

2018-04-07 Thread Alexander Grotewohl
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 b

Re: [fpc-pascal] Inline scoped enums

2018-04-07 Thread Alexander Grotewohl
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 pa

Re: [fpc-pascal] The unfortunate deprecation of GetTickCount

2018-04-11 Thread Alexander Grotewohl
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 ran

Re: [fpc-pascal] The unfortunate deprecation of GetTickCount

2018-04-11 Thread Alexander Grotewohl
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 compil

Re: [fpc-pascal] The unfortunate deprecation of GetTickCount

2018-04-11 Thread Alexander Grotewohl
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 h

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

2018-04-18 Thread Alexander Grotewohl
IIRC I used these: http://gnuwin32.sourceforge.net/packages/openssl.htm Not sure about the file naming, but just put the .dll files in the same directory as your executable. You'll know pretty quick if it works :) On 04/18/2018 12:57 PM, Dennis wrote: According to http://wiki.lazarus.freepasc

Re: [fpc-pascal] pointerful

2018-04-22 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Stack alias for ARC like memory management?

2018-04-25 Thread Alexander Grotewohl
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. Jus

Re: [fpc-pascal] Stack alias for ARC like memory management?

2018-04-25 Thread Alexander Grotewohl
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 wrote: At work I've recently used Free Pascal to interface our accounting syst

Re: [fpc-pascal] FPC on Android tablets: ARM, x86_64

2018-05-11 Thread Alexander Grotewohl
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 seen

Re: [fpc-pascal] Copy dynamic array

2018-05-15 Thread Alexander Grotewohl
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 array

Re: [fpc-pascal] Copy dynamic array

2018-05-15 Thread Alexander Grotewohl
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;

Re: [fpc-pascal] Copy dynamic array

2018-05-16 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Alexander Grotewohl
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 announced in the list)

Re: [fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?

2018-08-23 Thread Alexander Hofmann
Hi, I recently built a Weather-Station using an RPi and Lazarus/FPC, but: anything that's not I2C or SPI (or otherwise supported within the RPi hardware) is IHMO hard to realize. I went on and used an AVR (Arduino) to interface the DHT11, and hooked that up to the Pi with UART (just before dumping

Re: [fpc-pascal] Using REST based Services

2018-10-07 Thread Alexander Grotewohl
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 Santhof

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Alexander Grotewohl
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);    TFileName.hwndOw

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-12 Thread Alexander Grotewohl
o not save 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 tu

Re: [fpc-pascal] FPC-based http/s server

2018-12-10 Thread Alexander Grotewohl
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 point

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Alexander Grotewohl
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 th

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Alexander Grotewohl
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 -

Re: [fpc-pascal] The keyboard unit

2019-05-10 Thread Alexander Grotewohl
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-p

Re: [fpc-pascal] Debug Advice needed

2019-05-21 Thread Alexander Grotewohl
ork-alikes, the virtual pascal VP21USER.PDF debugging section might be useful for learning that stuff.--Alexander Grotewohlhttp://dcclost.comOn May 21, 2019 7:34 AM, James Richters wrote:I have this program that is confounding me.    It obtains a file name with GetOpenFileNameA then it processes the

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread Alexander Grotewohl
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

Re: [fpc-pascal] why isn't the 'exit' in the finally end clause executed?

2019-06-23 Thread Alexander Grotewohl
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 s

Re: [fpc-pascal] += property bug?

2019-08-11 Thread Alexander Grotewohl
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 Jo

Re: [fpc-pascal] Very vague gettickcount64 description?

2019-09-07 Thread Alexander Grotewohl
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

Re: [fpc-pascal] DecodeDate vs DecodeDateFully

2019-10-14 Thread Alexander Grotewohl
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 Bool

Re: [fpc-pascal] fpbind ipv6 version

2019-10-27 Thread Alexander Grotewohl
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: ar

Re: [fpc-pascal] Cannot find system type "__m64"

2020-03-06 Thread Alexander Grotewohl
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:4

Re: [fpc-pascal] Killing the mail list

2020-03-15 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Alexander Grotewohl
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://dcclos

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Why external execution so slow?

2020-03-31 Thread Alexander Grotewohl
while 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-pascal] Wine + Unsupported ioctl

2020-04-04 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Alexander Grotewohl
pt in the freepascal installer 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.freep

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Alexander Grotewohl
iting 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 f

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Converting http date back to TDateTime

2020-04-28 Thread Alexander Grotewohl
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

Re: [fpc-pascal] Converting http date back to TDateTime

2020-04-28 Thread Alexander Grotewohl
now)); To 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

  1   2   >