[fpc-pascal] Having trouble defining an initialized constant correctly

2010-12-17 Thread Cox, Stuart TRAN:EX
Please excuse me if I've posted this request to the wrong list. I really did spend some time in trying to find a FPC list for simple coding questions. Sorry. I have a set of record types defined and want to create an initialized constant and an array constant with values. Occasionally I find th

RE: [fpc-pascal] Is System.IOResult thread-safe? (If not, I need to replace it.)

2010-11-19 Thread Cox, Stuart TRAN:EX
Thanks for this example, Jonas. Stu Cox On 10 Nov 2010, at 13:26, MegaBrutal wrote: > I'm new on the list. I have a problem. I've been trying to make my > application thread-safe by using lockfiles. I used System.Rewrite to > lock the file, and System.IOResult to check the result. But I've > enc

RE: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Cox, Stuart TRAN:EX
>-Original Message- >From: fpc-pascal-boun...@lists.freepascal.org >[mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Doug Chamberlin >Sent: Wednesday, January 13, 2010 11:21 AM >To: FPC-Pascal users discussions >Subject: Re: [fpc-pascal] FPC class syntax was extended to suppor

RE: [fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.

2009-11-18 Thread Cox, Stuart TRAN:EX
In all of this discussion, shouldn't the point be that the passing an un-initialized variable is correctly being reported as a possible error (of limited severity)? The _proper_ solution is to initialize the variable's contents and then use it. The alternative is to substitute an alternative

RE: [fpc-pascal] #26 as EOF marker?

2009-09-02 Thread Cox, Stuart TRAN:EX
And the grandfather of the whole line, CP/M. Stu Cox Project Management Technician Southern Interior Region Ministry of Transportation and Infrastructure 342-447 Columbia St., Kamloops, BC V2C 2T3 p: 250-828-4320 f: 250-828-4229 stuart@gov.bc.ca -Original Message- From: fpc-pascal-boun

RE: [fpc-pascal] A complex trouble(at least for me)

2009-05-07 Thread Cox, Stuart TRAN:EX
There's some interesting ideas on how to store hierarchical data in tabular form available by googling "how can I represent hierarchal data in a relational database?" You might be able to linearize your hierarchical structure's data by using the techniques found there. Stu Cox Project Manage

RE: [fpc-pascal] Difference between initialization and begin in a unit

2009-04-16 Thread Cox, Stuart TRAN:EX
Could there be one slight difference in that an initialization section is required if there's going to be a finalization section in the unit? That is, there can't be a finalization section in the absence of an initialization section? Stu Cox Project Management Technician Southern Interior Region

RE: [fpc-pascal] class constants

2008-01-23 Thread Cox, Stuart TRAN:EX
Have a look at http://delphi.about.com/library/weekly/aa031505a.htm as a (not too bad) way to do it in Delphi. FPC too? Stu Cox Project Management Technician Southern Interior Region Ministry of Transportation 342-447 Columbia St., Kamloops, BC V2C 2T3 p: 250-828-4320 f: 250-828-4229 [EMAIL PROT

RE: [fpc-pascal] Question on how to avoid memory trouble

2007-02-05 Thread Cox, Stuart TRAN:EX
Shucks everybody... I think that its great that the hornet's nest that I stirred up might mean that a new unit of container classes gets written. I didn't think that my seemingly simple problem would create such a cascade of interest. Lists are catalysts for invention! My trouble remains that I

RE: [fpc-pascal] Question on how to avoid memory troubleusing FindFirst(), FindNext() and FindClose()

2007-02-02 Thread Cox, Stuart TRAN:EX
Thanks for taking the time to offer help. I don't believe that the memory is being used up by the TStringList since I eliminated it from being populated at all. Through the whole run of examining the drive's directories it never gets given a file. Yet, memory is still completely used up. Seems

[fpc-pascal] Question on how to avoid memory trouble using FindFirst(), FindNext() and FindClose()

2007-02-02 Thread Cox, Stuart TRAN:EX
I am trying to EnumerateFiles (create a list of all files that match a given filespec) across and down a whole drive. I've directly used the EnumerateFiles code from TurboPower's SysTools as available on SourceForge. The code works just as TurboPower designed and it and my wrapper code runs find

RE: [fpc-pascal] Trim repeated whitespace from a string

2006-05-26 Thread Cox, Stuart TRAN:EX
Blaise Computing's "Power Tools Plus" offered just such a function in their Unit_Str unit. The __CvtStr function used the _REM_LEAD_WHITE_STR + _REM_TRAIL_WHITE_STR + _REDUCE_WHITE_STR combination of constants to achieve what you'd like to do. I have the full source to all their units, but, as th

RE: [fpc-pascal] Bindings to Computational Geometry libraries

2005-10-28 Thread Cox, Stuart TRAN:EX
other interest there is Stu -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Pelton Sent: Friday, October 28, 2005 1:11 PM To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] Bindings to Computational Geometry libraries On 10/28/05, Cox, S

[fpc-pascal] Bindings to Computational Geometry libraries

2005-10-28 Thread Cox, Stuart TRAN:EX
There are a number of Computational Geometry libraries available from the web. It would be nice to be able to use them in the Pascal world. Does anyone have bindings or wrappers or translations to FP for LEDA, CGAL or say XYZGeobench? Stu Cox Project Management Technician Southern Interior Regio

FW: [fpc-pascal] Opening .dta and .key files

2005-09-18 Thread Cox, Stuart TRAN:EX
I'd guess that these two file types are data and index files produced by the programmer of your TP program when he used the "Turbo Pascal Database Toolbox" as the database manager. Borland gave some hints that they might release the source code for these toolboxes a few years ago but I've yet to

RE: [fpc-pascal] Opening .dta and .key files

2005-09-18 Thread Cox, Stuart TRAN:EX
I'd guess that these two file types are data and index files produced by the programmer of your TP program when he used the "Turbo Pascal Database Toolbox" as the database manager. Borland gave some hints that they might release the source code for these toolboxes a few years ago but I've yet to s

RE: [fpc-pascal]Two simple dynamic arrays questions

2004-07-28 Thread Cox, Stuart TRAN:EX
Would not allocating the dynamic arrays a single element greater in size not permit you to address their elements the way you'd like. I.e.: for a five element array, allocate size 6 and get [0..5] and then use only [1..5]? Just pretend that the [0] position doesn't exist. Of Course, you'd have to