[fpc-pascal] Dynamic Array Length

2009-12-31 Thread Rainer Stratmann
const data : array[ 1..{leave open} ] of byte = ( 11 , 12 , 13 ); datalen = sizeof( data ) div data[ 1 ]; Would this possible in a way? In C it is possible. Now I have to know the length of the array data and say it before. ___ fpc-pascal maillist

Re: [fpc-pascal] Dynamic Array Length

2009-12-31 Thread Anthony Walter
With Delphi/FPC you have a few choices: Fixed length arrays, dynamic length arrays, and variant type arrays Fixed length arrays cannot be resized and their lower and upper bounds are immutable. The lower and upper bounds can start at any ordinal position. The upper bound can ever be less than

Re: [fpc-pascal] Dynamic Array Length

2009-12-31 Thread Rainer Stratmann
Hello Anthony, all I want is that the compiler calculates the len of the const array. const  data : array[ ... ] of byte = ( 11 , 12 , 13 );  datalen = sizeof( data ) div data[ 0 ]; In C it is possible. I think in FPC not :-( Best regards, Rainer Am Thursday 31 December 2009 14:54:37

Re: [fpc-pascal] Dynamic Array Length

2009-12-31 Thread Anthony Walter
No, the compiler will not fill in the array length based on your element list. It does compute the length while compiling and *you* need to match it in your declaration. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Dynamic Array Length

2009-12-31 Thread Rainer Stratmann
Am Thursday 31 December 2009 15:33:50 schrieb Anthony Walter: No, the compiler will not fill in the array length based on your element list. It does compute the length while compiling and *you* need to match it in your declaration. But it would be a step to more userfriendly if the compiler

Re: [fpc-pascal] Dynamic Array Length

2009-12-31 Thread Anthony Walter
Sure, I agree. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] OT: Happy new year

2009-12-31 Thread ik
Hello All, Sorry for the offtopic, but I wish you all happy new year. I hope that in 2010 we'll see Pascal, FPC and Lazarus become more main stream. Have a great new year and 2010, Ido http://ik.homelinux.org/ ___ fpc-pascal maillist -

[fpc-pascal] Re: [Lazarus] OT: Happy new year

2009-12-31 Thread Giuliano Colla
I join Ido in wishing you all a very happy new year. To Ido, shana tova umetukah. Giuliano ik ha scritto: Hello All, Sorry for the offtopic, but I wish you all happy new year. I hope that in 2010 we'll see Pascal, FPC and Lazarus become more main stream. Have a great new year and

Res: [fpc-pascal] OT: Happy new year

2009-12-31 Thread Silvio Clecio
Hello friends, Happy 2010 to every FPC-Pascal user! -- Silvio Clecio -- Blog estilo mural - http://silvioclecio.blogspot.com Twitter - http://twitter.com/silvioprog -- programmer ObjectPascal - http://silvioprog.blogspot.com -- O homem está sempre disposto a negar tudo aquilo que não