Re: [fpc-pascal] Example of using TInetSocket, please

2015-09-21 Thread silvioprog
On Tue, Sep 22, 2015 at 1:40 AM, Bo Berglund wrote: > [...] Are there some examples of sending binary data between a TCP/IP server > and the TInetSocket socket? If so please post links. > FPC has some TCP/IP (using TInetSocket) demos, and you can see that on its sources, eg: Client: \source\pa

[fpc-pascal] Example of using TInetSocket, please

2015-09-21 Thread Bo Berglund
I am porting an application from Windows Delphi 2007 to FPC on Linux (Raspberry Pi2). In the process I need to switch from using RS232 to TCP/IP to communicate with a data source. I have found that FPC contains the unit ssockets.pp, which implements a client socket class TInetSocket. But I need a

Re: [fpc-pascal] H2Pas sugestion: new -V param

2015-09-21 Thread leledumbo
> We already use something like this in WriteLn/ReadLn, eg: > > WriteLn('some', 'separed', 'arguments', 'without', 'squared', 'braces'). Different semantics, this one is properly type checked (and each converted to different actual procedure based on its type). > So, after this little explanatio

[fpc-pascal] H2Pas sugestion: new -V param

2015-09-21 Thread silvioprog
Hello, Some days ago, I did a conversion from a C header to Pascal, and I noticed that H2Pas tool could implement a little bit improvement for Variadic[1] (or varargs) functions conversion. Consider the following C function with `varargs`: int function foo(int bar, ...) {}; I can call this func

Re: [fpc-pascal] howto find alternatives for deprecated fucntions?

2015-09-21 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > > [sock2text etc] > > If I had had my way, the whole shebang would have been removed in 2.0.0, but > > that was deemed to drastic. > > It's more that some people (including me) didn't agree that those > routines should be deprecated and removed at al

Re: [fpc-pascal] howto find alternatives for deprecated fucntions?

2015-09-21 Thread Jonas Maebe
marcov wrote on Wed, 16 Sep 2015: [sock2text etc] If I had had my way, the whole shebang would have been removed in 2.0.0, but that was deemed to drastic. It's more that some people (including me) didn't agree that those routines should be deprecated and removed at all. Jonas ___

Re: [fpc-pascal] dereferenced pointer as open array argument

2015-09-21 Thread Jonas Maebe
Seth Grover wrote on Fri, 18 Sep 2015: procedure ArrayTest(const data : array of char); ... However, it surprised me that this syntax was accepted (with a dereferenced pchar): ArrayTest(myPChar^); as well as this syntax (with a simple char): ArrayTest(myChar); In both of those cases, Arra

Re: [fpc-pascal] Resourcestrings in FPC 3.0

2015-09-21 Thread Jonas Maebe
Martin Schreiber wrote on Sun, 20 Sep 2015: Are there any changes? How resourcestrings are encoded? Resourcestrings are stored using the same code page as constant ansistrings in the source file in which they are defined (i.e., according to the rules for constant ansistrings described on