[fpc-pascal]Two simple dynamic arrays questions

2004-07-28 Thread Alan Mead
Hi, I am new to dynamic/open arrays. I've installed 1.9.4 and played with the example code, read the docs, and converted a sample program that I'd written using static arrays to dynamic. I have two residual questions: (1) Previously, I had fillchar'd the static arrays with zeros because they are

[fpc-pascal]Help! /usr/bin/ld: cannot find -lc

2004-07-28 Thread Jeff Weeks
I can't figure out how to fix this error when compiling [linux - RH8]: /usr/bin/ld: cannot find -lc Any help greatly appreciated! ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]Help! /usr/bin/ld: cannot find -lc

2004-07-28 Thread Jonas Maebe
On 28 jul 2004, at 23:15, Jeff Weeks wrote: I can't figure out how to fix this error when compiling [linux - RH8]: /usr/bin/ld: cannot find -lc Install the (C-)development libraries (libc-dev or something like that) for your system using your favorite package manager. Jonas __

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

2004-07-28 Thread Jonas Maebe
On 28 jul 2004, at 19:48, Alan Mead wrote: (1) Previously, I had fillchar'd the static arrays with zeros because they are sparse-ish. Looks like dynamic arrays are automagically filled with zeros. Is this true/permanent? Yes. (2) There is no way, I supposed, to switch the array indexes to start a

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

2004-07-28 Thread Eduardo Morras
At 19:48 28/07/2004, you wrote: (2) There is no way, I supposed, to switch the array indexes to start at 1 is there? I ask not from intrasigence but because I am using matricies and it rains on my elegance parade to have to perform the trivial translation each time I want to access an element usin

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

[fpc-pascal]Extension of macros exceeds a depth of 16

2004-07-28 Thread Alan Mead
As a I mentined earlier today in a different thread, I have upgraded to 1.9.4 and I appreciate the greater checking. Most of the new warnings I get are clear but one of my units now reports "Extension of macros exceeds a depth of 16". What does this warning mean and what is the rammification of i

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

2004-07-28 Thread Alan Mead
Yes, this is a good idea. I think it thwarts length() and low() but since I'm using two dimensional arrays, these aren't helpful... I'm not a fluent OOP programmer, but I'm already using a record to record the real rows and columns, matrix name, etc. so I think I'm going to wrap these open arrays

[fpc-pascal]force ansistrings to be copied on duplication

2004-07-28 Thread Marc Santhoff
Hi, according to the manual AnsiStrings are 'copied on change'. Can the compiler be forced to copy on duplication? --- like this --- var s1:PChar='something'; s2:PChar; begin s2 := s1; if (s1 <> s2) then writeln('Okay') else writeln(':-( only a doubled pointer'); end; --- A

[fpc-pascal]Re: force ansistrings to be copied on duplication

2004-07-28 Thread Marc Santhoff
Hi again, Am Do, den 29.07.2004 schrieb Marc Santhoff um 06:33: > --- like this --- > var > s1:PChar='something'; this should be s1:AnsiString='something'; of course ... > s2:PChar; > > begin > s2 := s1; > if (s1 <> s2) then > writeln('Okay') > else > writeln(':-( only