[fpc-pascal] String type compatibility

2013-04-03 Thread Xiangrong Fang
Hi, In the following program: program worksheet; {$mode objfpc}{$H+} type TWorksheet = packed object private FProp: string[5]; //FProp: Integer; public property Prop: ShortString read FProp; //property Prop: Integer read FProp; end; begin end. I got an error while compile

Re: [fpc-pascal] String type compatibility

2013-04-03 Thread Marco van de Voort
In our previous episode, Xiangrong Fang said: > > worksheet.lpr(9,42) Error: Incompatible types: got "TWorksheet.ShortString" > expected "ShortString" > > I wonder who defined "TWorksheet.ShortString"? Why string[5] is not > compatible with ShortString? Shortstring, is an alias for shortstring[2

Re: [fpc-pascal] String type compatibility

2013-04-03 Thread Xiangrong Fang
2013/4/3 Marco van de Voort > > Shortstring, is an alias for shortstring[255] the maximum size. Use getters > and setters if you want to make this work. > Thanks, however, I am just defining getter. So, to make this work, I need to define things like: type MyProp = string[5]; then use it in

[fpc-pascal] Re: String type compatibility

2013-04-03 Thread leledumbo
> BTW, recently there are many discussions about language features, now I would like to ask one question, why the following is not supported in pascal: procedure SomeThing(AParam: array[0..10] of Integer); or procedure SomeThing(Aparam: string[10]); But you have to define a custom type first?

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Mark Morgan Lloyd
leledumbo wrote: BTW, recently there are many discussions about language features, now I would like to ask one question, why the following is not supported in pascal: procedure SomeThing(AParam: array[0..10] of Integer); or procedure SomeThing(Aparam: string[10]); But you have to define a

[fpc-pascal] Problem using Free-Pascal in Win98

2013-04-03 Thread Chuck H Wilson
To whom it may concern: I've downloaded two versions of Free Pascal, version number "2.6.0" and version number "2.6.2", both exhibit the same problem. Also, I've loaded the very same two versions onto MS-WndowsXP Pro, and both versions work just fine (no problem exhibited). Here is how the probl

Re: [fpc-pascal] DBF components are maintained now

2013-04-03 Thread Graeme Geldenhuys
On 2013-04-03 07:09, Reinier Olislagers wrote: > > Just wanted to let you know about > http://wiki.lazarus.freepascal.org/User_Changes_Trunk#TDBF_unit_deprecation_removed Nice, thanks for that. I have plans on possibly using DBF on ARM based systems (and adding support to tiOPF). DBF is the only

Re: [fpc-pascal] DBF components are maintained now

2013-04-03 Thread Reinier Olislagers
On 3-4-2013 9:39, Graeme Geldenhuys wrote: > On 2013-04-03 07:09, Reinier Olislagers wrote: > Nice, thanks for that. I have plans on possibly using DBF on ARM based > systems (and adding support to tiOPF). DBF is the only "server" I know > that you can compile into FPC executables - no dependencies

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Noah Silva
Hi, If you want a 16bit version, then probably WideString? UTF8String is better for many purposes though. (Though in FPC is is currently just an alias to AnsiString). Thank you, Noah Silva 2013/4/3 Mark Morgan Lloyd > leledumbo wrote: > >> BTW, recently there are many discussions about la

Re: [fpc-pascal] Problem using Free-Pascal in Win98

2013-04-03 Thread LacaK
Where do you experience this behavior? I use Lazarus 1.0.8 + FPC 2.6.2 under Win98 and in IDE for me it works as expected also in small test application. With EN keyboard: - CapsLock=ON: Shift+9=(, same with CapsLock=OFF -Laco. To whom it may concern: I've downloaded two versions of Free Pas

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Sven Barth
Am 03.04.2013 12:11, schrieb Mark Morgan Lloyd: leledumbo wrote: BTW, recently there are many discussions about language features, now I would like to ask one question, why the following is not supported in pascal: procedure SomeThing(AParam: array[0..10] of Integer); or procedure SomeThing(A

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Sven Barth
Am 03.04.2013 11:44, schrieb leledumbo: BTW, recently there are many discussions about language features, now I would like to ask one question, why the following is not supported in pascal: procedure SomeThing(AParam: array[0..10] of Integer); or procedure SomeThing(Aparam: string[10]); But

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Mark Morgan Lloyd
Sven Barth wrote: Am 03.04.2013 12:11, schrieb Mark Morgan Lloyd: I wonder if I could ask a related question. I was looking at some parser code yesterday that I wrote years ago, and that still compiles with TP5, TopSpeed and so on. It's got a couple of underlying string[255] declarations: is

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Xiangrong Fang
> It's because in Pascal you need to declare types first. But why array[0..10] of Integer, or string[255] are not "types"? Remember that you can use "open array" in function params anyway. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Sven Barth
Am 03.04.2013 16:25, schrieb Xiangrong Fang: > It's because in Pascal you need to declare types first. But why array[0..10] of Integer, or string[255] are not "types"? Remember that you can use "open array" in function params anyway. They are types, but anonymous ones. Also do not confuse

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Jonas Maebe
On 03 Apr 2013, at 16:25, Xiangrong Fang wrote: It's because in Pascal you need to declare types first. But why array[0..10] of Integer, or string[255] are not "types"? They are type definitions. Parameter lists cannot contain type definitions, only previously defined types. The main reas

[fpc-pascal] newbie question: using fpc in linux

2013-04-03 Thread duilio foschi
thanks to your suggestions, I could compile and successfully test the 'hello world' code that comes with the brook framework. Now I am ready to wet my feet in the world of web programming. In my company we have a few dedicated (remote) servers running linux. And (when I will be able to get real

Re: [fpc-pascal] newbie question: using fpc in linux

2013-04-03 Thread Michael Van Canneyt
On Wed, 3 Apr 2013, duilio foschi wrote: thanks to your suggestions, I could compile and successfully test the 'hello world' code that comes with the brook framework. Now I am ready to wet my feet in the world of web programming. In my company we have a few dedicated (remote) servers runni

Re: [fpc-pascal] newbie question: using fpc in linux

2013-04-03 Thread Tony Caduto
If your just doing Web Development you can cross compile for linux on windows, it's not that bad, you do need to build the cross compiler and then copy some of the linux libs to your development pc. It's totally possible and then you just copy the compiled app to your server, you don't need fpc

[fpc-pascal] Re: String type compatibility

2013-04-03 Thread leledumbo
Just a side little question: AFAIK the standard allows such a definition inside parameter, so we're not ISO compatible at this point? -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/String-type-compatibility-tp5713952p5713971.html Sent from the Free Pascal - Ge

[fpc-pascal] Re: Problem using Free-Pascal in Win98

2013-04-03 Thread leledumbo
I think the OP is using FP console IDE, many people just can't distinguish IDE and compiler... (no offense) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Problem-using-Free-Pascal-in-Win98-tp5713957p5713972.html Sent from the Free Pascal - General mailing lis

Re: [fpc-pascal] Re: String type compatibility

2013-04-03 Thread Jonas Maebe
On 03 Apr 2013, at 18:29, leledumbo wrote: > Just a side little question: AFAIK the standard allows such a definition > inside parameter, so we're not ISO compatible at this point? If that is indeed true, then we are not. Jonas ___ fpc-pascal maillis

Re: [fpc-pascal] Re: Problem using Free-Pascal in Win98

2013-04-03 Thread Bart
On 4/3/13, leledumbo wrote: > I think the OP is using FP console IDE, many people just can't distinguish > IDE and compiler... (no offense) If so, then he should look at http://bugs.freepascal.org/view.php?id=9437 Bart ___ fpc-pascal maillist - fpc-p