Re: [fpc-pascal] Design Patterns Questions

2012-10-29 Thread Ewald
You might find some info on the list archive for fpc-devel: http://lists.freepascal.org/lists/fpc-devel/2012-October/030149.html -- Ewald On 10/28/2012 04:09 PM, bsquared wrote: > Hi all, > > It has been some time since I have used FPC/Laz. I was looking for some > information

Re: [fpc-pascal] Best way to transfer data between applications?

2012-10-30 Thread Ewald
the VMT if I recall correctly). Then, as Jorge mentioned you only need to provide a neat little factory that `converts` these buffers to classes with which you can just continue in the usual OOP way. Hope this helps. -- Ewald Events don't necessarily happen in chronological ord

Re: [fpc-pascal] convert floating point to bcd and vice versa

2012-11-01 Thread Ewald
ng like this: Move(YourVariable, YourArray[0], SizeOf(YourVariable)) (note that you might want to take endianess into account, but I don't know if this applies to floats as it does to integers) -- Ewald Events don't necessarily happen in chronological order; yet somehow they do persi

Re: [fpc-pascal] weird printout of char

2012-11-05 Thread Ewald
4 > Under Linux. > > What am I missing or doing wrong ? > > Thanks, > Ido > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Ewald Ev

Re: [fpc-pascal] Re: cannot make debugserver

2012-11-07 Thread Ewald
p(381) Fatal: There were 8 errors compiling module, >> stopping >> Fatal: Compilation aborted >> make: *** [debugserverintf.ppu] Error 1 >> >> > > After more searching I found some posts that seem to indicate that the > debugserver has not worked for some time.

Re: [fpc-pascal] Re: cannot make debugserver

2012-11-07 Thread Ewald
On 11/07/2012 10:06 PM, Marco van de Voort wrote: > In our previous episode, Ewald said: >> Change all calls to (I don't know if argument lists are the same, it's >> been a long time) >> Listen() to fpListen() >> ShutDown() to fpShutDown() >>

Re: [fpc-pascal] Is it possible to redefine FreePascal types?

2012-11-21 Thread Ewald
[0], Length(a) * SizeOf(Char)); End; ; The compiler should generate an error when you try to typecast a String to a NewString. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Class procedural type

2012-12-17 Thread Ewald
mine. Any ideas? BTW: For time being I fixed it through TProcType(Pointer(@TTestClass.AMethod)), where `TProcType = Procedure;`. I think this boiles down to the same as a class procedure is nothing more than a normal procedure as I see it (except for the name and some other syntax)

Re: [fpc-pascal] Class procedural type

2012-12-17 Thread Ewald
d now. TTestClass.AField:= 0; //Right? End; Sorry if I've just written the same thing twice (maybe thrice ;-) ) , but I've got this feeling that this isn't anywhere in the manual pages so I want to be absolutely sure about this. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Class procedural type

2012-12-18 Thread Ewald
Once upon a time, on 12/18/2012 06:42 AM to be precise, Sven Barth said: > > Am 17.12.2012 22:27 schrieb "Ewald" <mailto:ew...@yellowcouch.org>>: > > > > It should not contain this hidden parameter? In that case the above > code (with the intermediat

Re: [fpc-pascal] SocketError 183

2012-12-23 Thread Ewald
n? Does it return something >= 0? In that case the error comes from somewhere else. As to your question wether SocketError() is thread-safe. On *nix (tested on Mac OS X 10.6.8 and several Linuxes) it is, I'm using this function in a multithreaded server and it's results are

Re: [fpc-pascal] Favourite Pascal books

2013-01-22 Thread Ewald
cal books are? -Patrick > > For the beginning programmer: http://www.amazon.com/Sams-Teach-Yourself-Delphi-Days/dp/0672312867/ref=sr_1_1?s=books&ie=UTF8&qid=1358859138&sr=1-1&keywords=delphi+4+21 -- Ewald ___ fpc-pascal mail

Re: [fpc-pascal] interactively draw an ellipse

2013-01-23 Thread Ewald
er of R will be the final position of the mouse. > > During dragging, a temporary ellipse should be shown on screen and the > mouse will be cross-shaped. > > Any idea re how to do it ? > > An unexpensive well debugged 3th-party library would be the ideal > sol

Re: [fpc-pascal] GetCurrentThreadID under FreeBSD vs Linux

2013-02-08 Thread Ewald
BSD platforms at least. > > FmtStr(LThreadID, '%.4d', [PtrUInt(GetCurrentThreadID)]); > > > I've tested the PtrUInt() cast under FreeBSD, Linux and Windows, and it > seems to work fine. > > > BTW: > This code is only used to supply a threa

Re: [fpc-pascal] Set size limit

2013-03-11 Thread Ewald
256 element at the other, a set to > contain up to (say) 257 elements would require more space and that's > not supported. > Probably a typo, but 8 bit * 8 bytes = 64 elements. So I suppose you mean `[...] occupies 32 bytes in memory [...]`? Just so nobody ge

Re: [fpc-pascal] catch segfaults

2013-03-13 Thread Ewald
Once upon a time, Xiangrong Fang said: > Is it possible to use try...except to catch SIGSEGV? I don't know if it is possible, but how about using fpSignal()? See http://www.freepascal.org/docs-html/rtl/baseunix/fpsignal.html -- Ewald ___ fp

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-27 Thread Ewald
hing anyone has already mentioned, please forgive me, I've only just read this message and thought to elaborate a bit on it :-) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-28 Thread Ewald
Once upon a time, José Mejuto said: > El 28/03/2013 1:06, Ewald escribió: >> Sorry to just drop in on this quite late, but isn't gzip a >> compression algorithm and not a file format as such? gzip (the >> command line utility) only compresses one file and *doesn'

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-28 Thread Ewald
what I said earlier, but there can apparently be more than one file in a gzipped `thing`: see https://en.wikipedia.org/wiki/Gzip#File_format . It is not really all files in one container, but more like concatenating serveral of these one-file gzipped files, if you see what I mean. Anyway, I've ne

Re: [fpc-pascal] "Function header doesn't match" error

2013-03-31 Thread Ewald
It's that final declaration that goes wrong, but I can fix it by > moving the class back into the implementation part. FPC 2.6.2 on Linux > x86. > Just and idea: Can it be that you redefined TStringList (or boolean for that matter, but that doesn't strike me as obvious) in oneof t

Re: [fpc-pascal] How to detect connection status of a socket

2013-04-28 Thread Ewald
Note that even in non-blocking mode, 0 means the socket is closed. If you received no data yet, you will get -1 as a return value and errno will be set to EAgain of EWouldBlock (see the link above). Does this help or am I completely talking besides the point? -- Ewald

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Ewald
reful with this approach. Another way would be to use a non-blocking socket to accept connections... -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
On 03 May 2013, at 00:15, Zaher Dirkey wrote: > > On Fri, May 3, 2013 at 12:51 AM, Ewald wrote: > pthread_cancel() > > pthread_cancel() ​ ​​ not clos​e​ the handles i though​.​ That's true, but at least it returns control to you (= the programmer), so you can close

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
On 03 May 2013, at 11:30, Zaher Dirkey wrote: > > On Fri, May 3, 2013 at 12:18 PM, Ewald wrote: > That's true, but at least it returns control to you (= the programmer), so > you can close the handles manually. > > ​I am notprefer force to close any thing, that will

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
Once upon a time, Zaher Dirkey said: > On Fri, May 3, 2013 at 7:22 PM, Ewald wrote: > >> "Accept" but without errors > > ​You cant, Accept give you a handle of new socket or give you an error, not > all is fatal error, just check what is it, if it a closed handle o

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
On 03 May 2013, at 20:13, Marco van de Voort wrote: > In our previous episode, Ewald said: >> >> The point being that the answer to one of the OP sub-problems [the one >> quoted _partially_ above], can be to either use: >> - pthread_cancel() [overkill, I know,

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
ether or not the next IO operation is going to block. Now that we have established these two facts, I believe that using select before accept to check whether the latter will block is valid logic, wouldn't you say? PS: The exact details of this implementation I do not know, I haven'

Re: [fpc-pascal] Error: Duplicate identifier "FarPointer"

2013-05-15 Thread Ewald
http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to handle External:SIGPIPE on linux

2013-05-31 Thread Ewald
d some example code if you want. Or you could perhaps block this signal using pthread_sigmask (http://man7.org/linux/man-pages/man3/pthread_sigmask.3.html). I believe I have some example code of this too. -- Ewald ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] How to handle External:SIGPIPE on linux

2013-06-01 Thread Ewald
On 01 Jun 2013, at 08:51, Dennis Poon wrote: > Ewald, > > Please kindly share your sample codes for both approaches. > Thanks a lot Right, here you go: *** fpSignal() *** First you declare a function which is going to handle the signal (SignalHandler in my example), then y

Re: [fpc-pascal] Placing binary data (resources) in object files?

2013-06-03 Thread Ewald
Once upon a time, Tomas Hajny said: > On Mon, June 3, 2013 18:09, Ewald wrote: > Well, you can obviously use tool bin2obj created with/for FPC and > distributed with FPC releases - see fpcsrc/utils/bin2obj.pp. Seriously? I should really start looking at included tools... I've got thi

Re: [fpc-pascal] Placing binary data (resources) in object files?

2013-06-03 Thread Ewald
iginal data in bytes. To read the size, just use `csize_t(@{$escapedpascalname}_size)`. Note that the above is a very quick draft (kind of a quickfix for some other project -- but is works) and thus contains errors and lacks error checking. Use at your own risk ;-) PS: Sorry about the php code there; I know it's not the php mailing list, but my buildtool happens to be written in php ;-) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Placing binary data (resources) in object files?

2013-06-03 Thread Ewald
Once upon a time, Rainer Stratmann said: > For me this seems (too) complicated to do an easy thing (including some data). That, and I don't think that ld on mac os x can handle `-b` (or --format). -- Ewald ___ fpc-pascal maillist - fp

Re: [fpc-pascal] Can someone please explain the linker to me?

2013-06-05 Thread Ewald
x27;. IIRC the part after `.so` is considered a version number (or indication thereof). The behaviour you are seeing is *probably* that the linker could not find `libcrypto.so.1.2.asdasd`, so it decides to use the one it found instead. Anyway, I don't know that much about `the lin

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-15 Thread Ewald
file) is reached on *blocking filedescriptors*. Note that the above is a rather sumarized explanation, but it should make the point. FYI: I've never had the problem of a `partial read` (e.g. SomeStream.Read(50) returning 36 or something) on linux, osx and windows; so perhaps you

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Ewald
On 16 Jun 2013, at 03:18, Michalis Kamburelis wrote: > Ewald wrote: >> And what with non-blocking pipes pipes? Wait for a *some* period >> until you get all data? It is up to the programmer to do this INHO. > > If you want to get partial data (instead of waiting until all

Re: [fpc-pascal] synapser freezes on fopen(FDevice, 0_RDWR or 0_SYNC) on raspberry Pi

2013-07-08 Thread Ewald
etc... tcsetattr(Handle, TCSADRAIN, @Attr);// Take a look at the documentation of this call to see what constant (TCSADRAIN) you want to use. ===EOC=== Hope it helps! -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://li

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Ewald
Word(), ... I not, have a look at http://www.freepascal.org/docs-html/rtl/system/fillchar.html -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Ewald
Once upon a time, Marcos Douglas said: > Do you (all) use prefix in Procedures and/or Functions too? ;-) Unitname.GetHandler() ? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/

Re: [fpc-pascal] "identifier not found" case probelm

2013-11-10 Thread Ewald
; but when i try to run it it comes up with an error saying "identifier not > found" and highlights each of the case choices .. i.e. 3: returns; > .. any help ? :( :( :( And where exactly are these functions (`returns`, `withdraw`, etc...) defined? I can't see them

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
Once upon a time, silvioprog said: > Hello, > > How to decrypt a MD5 in FPC?: MD5 is a hashing algorithm, not an encryption algorithm. There is more than one input for this algorithm which will generate the same hash, as opposed to a cipher.

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
Once upon a time, silvioprog said: > 2013/12/11 Ewald mailto:ew...@yellowcouch.org>> > > Go to: http://md5decryption.com <http://md5decryption.com/> > In "Please input the MD5 hash that you would like to be decrypted:" > field, put: 7db4a8dae498d1b4686ebd1f79

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
though it cannot be called decryption. If I would advertise a bicycle as a car to you there would also be some confusion don't you think :-) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
for the noise. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Ewald
] instead of the name of the function as the second argument in GetProcAddress()? Perhaps try `GetProcAddress(LibHandle, 'soundtouch_clear');` on line 54 and modify the rest in a similar fashion? Hope it helps. -- Ewald ___ fpc

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Ewald
platform, except that you could try a similar approach as on linux (use symbol names instead of indices). OTOH it could (?) be that the the compiler inserts code to typecast PChar(1) to a string, which could result in an access violation (try `var a: string; a:= pchar(1);` to try it out ;-)

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ewald
.cpp which is the windows dll > wrapper. Note one detail: it is declared there as __stdcall, not as __cdecl, so perhaps this has something to do with it? @Fred: Also note that the type HANDLE is defined there as a pointer, so [as a sanity test of sorts] sizeof(Handle {in pascal}) should

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ewald
"C" in front of the symbol). or it could be that I am completely missing something here. [for example: is the symbol `DLL_EXPORTS` defined at compile time?] -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.free

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ewald
don't define THandle in your library wrapper. THandle is defined as a longint (http://www.freepascal.org/docs-html/rtl/system/thandle.html), but you need a pointer. Try putting `Type THandle = pointer;` somewhere before the first usage of this type in your library wrappe

[fpc-pascal] CPPClass Documentation?

2014-01-18 Thread Ewald
could shed some light on this? (Links to documentation I missed will do :-) ) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CPPClass Documentation?

2014-01-18 Thread Ewald
d. Thanks for the pointer! -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CPPClass Documentation?

2014-01-18 Thread Ewald
On 18 Jan 2014, at 15:22, Sven Barth wrote: > On 18.01.2014 13:45, Ewald wrote: >> Hi, >> >> This morning, I saw on fpc-devel a message titled `CPPClass`, which made >> me wonder if this keyword means what its name implies. Sadly though, >> there is not much do

Re: [fpc-pascal] how to pass a procedure address and execute it?

2014-01-23 Thread Ewald
.. how? :( > First define a type to make your like easier: Type TProcType: Procedure; Next, adjust contralContol's prototype: procedure centralControl(var aValue : word; theRecord : somerec; whichProc: TProcType); And you're done:-) -- Ewald __

Re: [fpc-pascal] how to pass a procedure address and execute it?

2014-01-24 Thread Ewald
en calls doThis and doThat with the necessary > parameters? > Simply change the type: Type TProc = Procedure(aRecord: somerec); Then you can call whichProc (in centralControl) with your argument of choice. -- Ewald __

Re: [fpc-pascal] how to pass a procedure address and execute it?

2014-01-24 Thread Ewald
On 24 Jan 2014, at 22:20, waldo kitty wrote: > On 1/24/2014 3:18 PM, Ewald wrote: >> >> On 24 Jan 2014, at 21:20, waldo kitty wrote: >> >>> On 1/23/2014 2:18 PM, waldo kitty wrote: >>> >>> following up on this, how do i pass parameter

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-13 Thread Ewald
27;t have debug info for your library this won't help you much. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Ewald
; One might think at first glance that `ReturnTheAnswer^` is 42, but this is incorrect in some cases. The example here might be extremely over-simplified, but replace `a: Integer` with `mystring: String` and we're roughly at your example. -- Ewald ___

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Ewald
o and fro you would be better off with a more pascalish version. The thing that comes to mind here is providing a function in your library that replaces the current memory manager with the one passed to it as an argument. This would allow you to simply return a string. -- Ewald __

Re: [fpc-pascal] Error compile library on Linux.

2014-03-26 Thread Ewald
ook me an our or so to track that one down :-) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Create and use a wrapper class in java

2014-04-27 Thread Ewald
#x27;m not mistaking?). Your chances of getting help with some extremely simple bit of java code are a lot better that case IMHO. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-29 Thread Ewald
p the queue that CheckSynchronize is supposed to empty. See http://www.freepascal.org/docs-html/rtl/classes/checksynchronize.html for more details on this call. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-30 Thread Ewald
On 30 May 2014, at 10:46, fredvs wrote: > re-@ Ewald : > >>> It *must* be called in the context of the main thread (the thread that >>> loaded the library) > > OOps, so do you mean that CheckSynchronize must be called by Java ? > So i have to add a "cus

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-30 Thread Ewald
On 05/30/2014 01:15 PM, fredvs wrote: > Please read my earlier post before this one > > @ Ewald, i have try with : > > While true do > Begin > ... code ... > > CheckSynchronize; > End; > > But this does not w

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-31 Thread Ewald
ava mechanism that allows him to `append` this checksynchronize to `the` main loop, some main-loop hook of sorts. That is IMHO the way to go for, but as my knowledge of java is rather limited, I cannot comment on the feasibility or practical details of this approach. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Thread Safety of String

2014-06-04 Thread Ewald
C++, just QStrings. (oops, yeah, I use Qt also) Time for some nitpicking..Yay! How about: char YourString[SIZE]; It's kind of a drudgery to handle those though, so I see why you like QStrings better :-) -- Ewald ___ fpc-pascal maillist -

Re: [fpc-pascal] Illeagal assignment to For Loop variable in Free pascal

2014-06-17 Thread Ewald
allows assignments to for-loop counters (although I doubt it), I don't know. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] cthreads

2014-07-25 Thread Ewald
for this was that FPC has no dependency to libc under normal circumstances. Making cthreads the default thread manager would thus add a dependency to libc. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal

Re: [fpc-pascal] with statement using mulltiple objects

2014-09-16 Thread Ewald
has now evolved into is, in my opinion, off-topic. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Again: Use of abstract classes

2014-10-02 Thread Ewald
On 10/02/2014 05:35 PM, silvioprog wrote: > Hello, > > Someone could inform me if there is an entry in bugtracker with > references to this topic? This has already been fixed I believe. See http://lists.freepascal.org/pipermail/fpc-devel/2014-July/033930.html for more information

[fpc-pascal] Question about functions returning a string

2014-11-28 Thread Ewald
anybody shed some light on this? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Question about functions returning a string

2014-11-29 Thread Ewald
mov%esi,%r12d <-- second argument, %rsi 44b36b:49 89 d5 mov%rdx,%r13<-- third argument, %rdx What I forgot to mention was that this is on a x86_64 architecture, so I based myself on the table found at http://wiki.osdev.org/Call

Re: [fpc-pascal] Question about functions returning a string

2014-11-30 Thread Ewald
that the other language can't do anything useful with it, my thought was that it would be possible to pass along these managed types (especially string, as it is a pointer internally) to another pascal function (a callback in my case). -- Ewald

Re: [fpc-pascal] Question about functions returning a string

2014-12-01 Thread Ewald
nwhile, I've fixed my issue by not returning a string as a result, but as an out parameter: Function Bla: String; ... becomes ... Procedure Bla(out Result: String); This seems to work. How portable it is, I do not know, I guess time will be the

Re: [fpc-pascal] else and otherwise in a case statement

2014-12-11 Thread Ewald
ticed something interesting under 2.6.4 on x86 Linux. > > How can "else" be ambiguous within a case statement? If one omits the trailing semicolon (the one that's commented), the else becomes ambiguous: Case Something of Value1: ;

Re: [fpc-pascal] OSX x86_64 make problem

2015-01-16 Thread Ewald
t/Base/fpc" Have you tried `make CPU_TARGET=x86_64 all` instead of `crossinstall`? That's how I just built the latest revision, 29488. Just a suggestion... -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fr

Re: [fpc-pascal] Cross-compile vs native

2015-01-27 Thread Ewald
ame argument as above... Projects are identical on both platforms though (except for a few ifdefs to access OS-specific functionality). -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Cross-compile vs native

2015-01-28 Thread Ewald
On 01/28/2015 10:01 AM, Michael Schnell wrote: > On 01/27/2015 10:27 PM, Ewald wrote: >> - Without the target system, the application cannot be tested .. > This is true, only because remote debugging is not well supported. For remote debugging a target system is needed as well

Re: [fpc-pascal] FPC embedded ? (going slightly off-topic)

2015-03-05 Thread Ewald
pping ? Stepping and microstepping can easily be implemented in the microcontroller itself, like you say. The reason you need an extra chip is the need for some power transistors arranged in a bridge configuration, something similar to the L298 or L293D, to name some popula

Re: [fpc-pascal] how to use procedure of object in C

2015-03-09 Thread Ewald
` kind of declarations (in constrast to `Class procedure XXX; static;`). I don't know how long that is going to last however (since this hidden parameter thingy is an implementation detail of the compiler I think). So I fully agree: it would be a kindness of the compiler people to confirm this

Re: [fpc-pascal] Saving and reading TBlowfish crypted text

2015-03-17 Thread Ewald
e TBlowFishStream descendants use? e.g. EBC, CBC, STR, OFB, ... (abbreviations taken from http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation) It is not documented at http://www.freepascal.org/docs-html/fcl/blowfish/tblowfishencryptstream.html I think. -- Ewald ___

Re: [fpc-pascal] Saving and reading TBlowfish crypted text

2015-03-18 Thread Ewald
On 17 Mar 2015, at 22:32, Graeme Geldenhuys wrote: > On 2015-03-17 18:49, Ewald wrote: >> The docs state that it is called automatically upon destruction: > > Correct, and I knew that. But I was explicitly looking at the code > Antonio supplied. > [...] > This is my i

Re: [fpc-pascal] getaddrinfo

2015-03-29 Thread Ewald
ng. As Mark suggested, perhaps a bug in the fpc implementation (fpc does not normally use lic for it's syscalls)? Try defining the function manually, using libc's equivalent and see if it produces the same result? Just a suggestion... -- Ewald

Re: [fpc-pascal] Using Cairo lib on Linux without X

2015-04-07 Thread Ewald
ways links to it, but does not use X11 functionality when XOpenDisplay fails? Just an idea... I'm no expert on the matter. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Finally, exceptions and so on.

2015-05-14 Thread Ewald
for example)? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Finally, exceptions and so on.

2015-05-14 Thread Ewald
Try Break Finally Whatever End; Repeat Try Continue Finally Whatever End Until True; End. ==== Code End -- Ewald ___ fpc-pascal maillist - fpc-pasc

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-12 Thread Ewald
issue :-) I wonder if you have tried to set the environment variable `LD_LIBRARY_PATH` to contain `the_path_you_want` before you spawn the other process? See also http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html : section 3.3. -- Ewald __

Re: [fpc-pascal] How to get the permission f a file ?

2015-06-17 Thread Ewald
al.org/docs-html/rtl/baseunix/stat.html -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread Ewald
is available to set the environment variables[1]. Using a TProcess, try setting the `Environment` property before running it[2]. Hope it helps :-) [1] http://linux.die.net/man/3/exec [2] http://www.freepascal.org/docs-html/fcl/process/tprocess.environment.html -- Ewald __

Re: [fpc-pascal] How to use a static method as procedure variable?

2015-07-05 Thread Ewald
be careful and write a small sanity test that checks correct operation every time you use a new compiler. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Basic Sockets in FreePascal

2015-07-26 Thread Ewald
he same as you would have in C, but all functions are prefixed `fp` (as are most other low level functions on *nix BTW). [1] http://www.freepascal.org/docs-html/rtl/sockets/index-5.html -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freep

Re: [fpc-pascal] which GUI (noob)

2015-08-05 Thread Ewald
op; (although functions/procedures are terminated using `end ;` as well) Extra feature: inherent concurrency support. I don't know about classes or generics, those will probably be in an newer standard. But who needs those? -- Ewald ___ fpc-p

Re: [fpc-pascal] got SIGSEGV with objfpc dialect

2015-09-13 Thread Ewald
On 09/13/2015 03:25 PM, che fou wrote: > Atm i don't know how to report , i'll try to figure out how to Try http://bugs.freepascal.org/ -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cg

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
will be appear > under the Free Pascal language Lexical topic: > > http://cache.getlazarus.org/images/lexical-diagrams.png What's wrong with those found in the documentation? (for example: http://www.freepascal.org/docs-html/ref/refse105.html

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
ng a secondary set of documentation the "terrible" state won't improve, now will it? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
On 01/30/2016 08:09 PM, Anthony Walter wrote: > Ewald, > > If you read the threads on the Lazarus forums I'm not subscribed to that forum as I do not use lazarus. I use freepascal without an IDE. So by all means: enlighten me :-) > you'll see the points people are making w

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
On 01/30/2016 08:22 PM, Anthony Walter wrote: > Ewald, > > Maybe you should go to the forums and enlighten everyone. I provided > the link in my last reply. You missed the point. It is not my intention to shove my opinion down anyone's throat. I do however think that reinvent

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-19 Thread Ewald
r debugging purposes, just add Function dlopen(filename: PChar; flags: cint): Pointer; cdecl; external; Function dlclose(handle: Pointer): cint; cdecl; external; Function dlsym(handle: Pointer; Name: PChar): Pointer; cdecl; external; F

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-19 Thread Ewald
eAddress(...); If Y = nil Then WriteLn('Y: ', dlerror); Z:= GetProcedureAddress(...); If Z = nil Then WriteLn('Z: ', dlerror); It is really nothing more than a function call, quite similar to fpGetErrNo. > I am in the dark. Being in the dark is posi

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-19 Thread Ewald
On 03/19/2016 08:53 PM, Marco van de Voort wrote: > In our previous episode, Ewald said: >>> Re-huh..., it should be a great plus if a dlerror() was implemented in fpc >>> too. >>> >>> But maybe I am missing something, maybe dlopen(), dlsym() and dlerror()

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-20 Thread Ewald
ead of "hn: TLibHandle"? I don't know if it can be assumed that this handle will always be an integer (think, for example, pointer)? Just a thought. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

  1   2   >