Re: [fpc-pascal] How to download fpc242 rc1 (to test a possible bug)

2010-09-12 Thread Marco van de Voort
In our previous episode, Luiz Americo Pereira Camara said: > > > > And it did compile with 2.4.0? > > Yes. Also with 251 Hmm, I think I know what that is. A wrong merge that should have been reverted. http://bugs.freepascal.org/view.php?id=16121 I'll see if I can squeeze that in. The 2.5.1 bre

Re: [fpc-pascal] How to download fpc242 rc1 (to test a possible bug)

2010-09-12 Thread Luiz Americo Pereira Camara
Marco van de Voort escreveu: In our previous episode, Luiz Americo Pereira Camara said: I noticed that there's a folder for fpc242 rc1 in ftp://ftp.freepascal.org/pub/fpc/beta/ Trying to access gives an error 550 The reason to get the 242 version is to test an bug reported by a user of th

Re: [fpc-pascal] How to download fpc242 rc1 (to test a possible bug)

2010-09-12 Thread Marco van de Voort
In our previous episode, Luiz Americo Pereira Camara said: > I noticed that there's a folder for fpc242 rc1 in > ftp://ftp.freepascal.org/pub/fpc/beta/ > > Trying to access gives an error 550 > > The reason to get the 242 version is to test an bug reported by a user > of the fpc243 snapshot pro

[fpc-pascal] How to download fpc242 rc1 (to test a possible bug)

2010-09-12 Thread Luiz Americo Pereira Camara
Hi, I noticed that there's a folder for fpc242 rc1 in ftp://ftp.freepascal.org/pub/fpc/beta/ Trying to access gives an error 550 The reason to get the 242 version is to test an bug reported by a user of the fpc243 snapshot provided at http://www.hu.freepascal.org/lazarus/ Basically it woul

Re: [fpc-pascal] Re: What is wrong with this enum and array related code

2010-09-12 Thread Honza
2010/9/12 Frank Church : > Does that mean that although an enum is an ordinal type, an integer cannot > be coerced into using it to index an array? IMO just cast it to the correct type (of the array index) giving the compiler a chance to accept it. -- bflm freepascal-bits.blogspot.com __

Re: [fpc-pascal] Re: What is wrong with this enum and array related code

2010-09-12 Thread Frank Church
On 12 September 2010 13:05, Vincent Snijders wrote: > 2010/9/12 Frank Church : > > I need to elaborate more on this code > > > > On this line > > > > d := stTypes[i - Ord(low(stType))]; > > > > since stTypes is an array, I expect stTypes[n], with n being 1 to 4, to > > retrieve an array value and

[fpc-pascal] Fw: Question mark?

2010-09-12 Thread Luis Fernando Del Aguila Mejía
ok, I understand. Excuse my ignorance. But what is mantis? What routines of the Windows API, use the Widestring Manager in Windows? Is there a guide to understanding the source of FPC? Thank you. Danke. ___ fpc-pascal maillist - fpc-pascal@lists.fr

Re: [fpc-pascal] Re: What is wrong with this enum and array related code

2010-09-12 Thread Vincent Snijders
2010/9/12 Frank Church : > I need to elaborate more on this code > > On this line > > d := stTypes[i - Ord(low(stType))]; > > since stTypes is an array, I expect stTypes[n], with n being 1 to 4,  to > retrieve an array value and as 'i - Ord(low(stType)) evaluates to integer it > should compile but

Re: [fpc-pascal] What is wrong with this enum and array related code

2010-09-12 Thread Vincent Snijders
2010/9/12 Frank Church : > program testnums; > //{$APPTYPE CONSOLE} > > uses >   Classes, SysUtils; > type >    stType = (stLite := -100, stDb, stBothLite, stBothDb); //settings > location Type >    stTypes = Array [stType] of integer; > var >  d : stType; >  s : string; >  i : integer; > begin >  

[fpc-pascal] Re: What is wrong with this enum and array related code

2010-09-12 Thread Frank Church
I need to elaborate more on this code On this line d := stTypes[i - Ord(low(stType))]; since stTypes is an array, I expect stTypes[n], with n being 1 to 4, to retrieve an array value and as 'i - Ord(low(stType)) evaluates to integer it should compile but it generates an error. What would be th

[fpc-pascal] What is wrong with this enum and array related code

2010-09-12 Thread Frank Church
program testnums; //{$APPTYPE CONSOLE} uses Classes, SysUtils; type stType = (stLite := -100, stDb, stBothLite, stBothDb); //settings location Type stTypes = Array [stType] of integer; var d : stType; s : string; i : integer; begin writeln(''); for i := Ord(low(stType)) to Ord(high(st

Re: [fpc-pascal] Question mark?

2010-09-12 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > On 11 Sep 2010, at 20:54, Luis Fernando Del Aguila Mej?a wrote: > > > That is, When I use readln, then the Widestring manager use the charset of > > the command interpreter (cmd 850), and when I use writeln, then the > > Widestring manager, use the char

Re: [fpc-pascal] Question mark?

2010-09-12 Thread Jonas Maebe
On 11 Sep 2010, at 20:54, Luis Fernando Del Aguila Mejía wrote: > That is, When I use readln, then the Widestring manager use the charset of > the command interpreter (cmd 850), and when I use writeln, then the > Widestring manager, use the charset of the Operating System (ANSI-1252). > (only win

[fpc-pascal] Re: How can you convert an enum value to string?

2010-09-12 Thread Frank Church
On 30 August 2010 11:30, Frank Church wrote: > Is there a subroutine that can convert an enum value to a strings, so that > I can do something like ShowMessage(EnumToStr(enumValue))? > > -- > program testnums; //{$APPTYPE CONSOLE} uses Classes, SysUtils; type stType = (stLite := -100, stDb