Re: [fpc-pascal] Sockets?

2013-07-17 Thread Timothy Groves
On 13-07-17 11:14 AM, Michael Schnell wrote: Synapse makes handling of sockets rather easy. Thanks. I'll check that one out. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Sockets?

2013-07-17 Thread Timothy Groves
I have prayed to Google many, many times, but I still cannot find an answer (or, at least, an answer that compiles). I want to set up a dirt-simple network client/server pair. So simple that all I do is hurl bytes into a bucket, and they get transferred to the other side. Does anyone know of

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Timothy Groves
On 13-07-17 11:16 AM, Rainer Stratmann wrote: You can use the sockets library for that. Examples of sockets programming are available in the internet, mainly in C, but you can see how it works with that. I found one that didn't compile. I managed to clean it up, somewhat poorly, enough for it

[fpc-pascal] ++ and --

2013-07-30 Thread Timothy Groves
FPC offers the +=, -=, etc., statements swiped from C. Is there any reason why ++ and -- are not similarly supported? I know that we have inc() and dec(), but I'd say that ++ and -- are easier to type. ___ fpc-pascal maillist - fpc-pascal@lists.fre

[fpc-pascal] Objects in dynamic arrays

2013-11-15 Thread Timothy Groves
How exactly are instantiated classes treated in an array? Can I copy one into another? And if I unallocate an array member, does it automatically Destroy the object? I have objects stored in a dynamic array, and I want to delete an arbitrary record. What I have right now is: var index,

[fpc-pascal] Re: Objects in dynamic arrays

2013-11-15 Thread Timothy Groves
On 13-11-15 07:57 PM, Timothy Groves wrote: How exactly are instantiated classes treated in an array? Can I copy one into another? And if I unallocate an array member, does it automatically Destroy the object? I have objects stored in a dynamic array, and I want to delete an arbitrary

[fpc-pascal] fpcmake and 64-bit Ubuntu

2011-01-27 Thread Timothy Groves
Any attempt to invoke fpcmake results in the following error: Processing Makefile.fpc Error: Target "linux", package "rtl" not found The system is an HP xw8200 (stock configuration) running Ubuntu 10.10 64-bit. I have both the i386 and the x86_64 versions of fpc-2.4.2 installed on this machin

[fpc-pascal] Set Caption in TLabel

2011-11-26 Thread Timothy Groves
I would like to change the caption on a TLabel in a program written in Lazarus. However, setting the Caption property directly produces a SIGSEGV. Any suggestions? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.or

[fpc-pascal] Forward declarations

2011-12-22 Thread Timothy Groves
Can anyone think of a situation in which you would *have* to use forward declared functions? I'm trying to come up with an example for such for my book, and I am drawing a blank. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists

Re: [fpc-pascal] Forward declarations

2011-12-22 Thread Timothy Groves
On 11-12-22 04:15 PM, Mark Morgan Lloyd wrote: However, there's probably still a way round that in a unit, by moving the first mention of one of those into the definition part. Or similarly you might be able to avoid it by using object definitions. Absolutely. Because in both of those cases,

Re: [fpc-pascal] Forward declarations

2011-12-22 Thread Timothy Groves
On 11-12-22 04:04 PM, Anton Shepelev wrote: But are "mutually recursive procedures and functions" necessary? Not at all. But there is no other reason to use forward-declared procedures that I can think of, and I need *something* to demonstrate why you might need them.

Re: [fpc-pascal] Re: Forward declarations

2011-12-26 Thread Timothy Groves
On 11-12-23 07:31 AM, leledumbo wrote: Back to high school time, I use it for turn based battle system for a game. I have two mutually (tail-)recursive procedures where one is the player movement decision (full with prompts) while the other is the enemy's (some AI calculation takes the decision).

[fpc-pascal] How to find a directory?

2012-04-06 Thread Timothy Groves
So the Powers That Be have decided that FSearch should never find a directory. Fantastic. So how *do* I find a directory (for example, to confirm if one exists?) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/

Re: [fpc-pascal] How to find a directory?

2012-04-06 Thread Timothy Groves
On 12-04-06 05:43 PM, Leonardo M. Ramé wrote: To check if a directory exists you can use the function "DirectoryExists('/path/to/directory')". To traverse your filesystem, just use findfirst-findnext: http://www.freepascal.org/docs-html/rtl/sysutils/findfirst.html Okay, thanks. It seems I wa

[fpc-pascal] Cloning objects?

2014-03-19 Thread Timothy Groves
Is there a drop-dead simple way to clone an object? I've got a small tree of classes (tBaseProfile, and four descendants of such). Only the descendant classes are instantiated. I need to be able to create new copies of these objects for use in other lists. At the moment, I am writing a Dupl

[fpc-pascal] Overriding properties

2014-07-09 Thread Timothy Groves
Is there any way to override the type of a property? As an example, if I have written a list class: type tList = class (tObject) private t_current : tObject; t_items : array of tObject; public property Current : tObject read t_current writ

Re: [fpc-pascal] Overriding properties

2014-07-09 Thread Timothy Groves
On 14-07-09 12:57 PM, Sven Barth wrote: Am 09.07.2014 18:43 schrieb "Timothy Groves" mailto:the.tail.kin...@gmail.com>>: > > Is there any way to override the type of a property? As an example, if I have written a list class: > > type > tList = cl