[fpc-pascal] Re: a proposal about "with" syntax

2013-03-16 Thread leledumbo
> PS. I can't believe Embarcadero went for ":" instead of "=" for declaring bounded/restricted generics :-/ That's correct, since : means "of type" in a declaration. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/a-proposal-about-with-syntax-tp5713601p57136

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Flávio Etrusco
On Sun, Mar 17, 2013 at 12:16 AM, Daniel Gaspary wrote: > On Sun, Mar 17, 2013 at 12:07 AM, 印場 乃亜 wrote: >> On 2013/03/17, at 11:37, Flávio Etrusco wrote: >>> Daniel, I find this hack as ingenious as atrocious ;-) >>> But thinking about it a bit, when FPC gets generic methods you can >>> make th

Re: [fpc-pascal] fpcup for FreeBSD

2013-03-16 Thread Marcos Douglas
On Sat, Mar 16, 2013 at 1:07 PM, Reinier Olislagers wrote: > (Cross posted: FPC+Laz lists) > > Hi all, > > I've updated the fpcup automatic FPC+Laz installer from svn for FreeBSD. > > Tested on PC BSD, (similar to FreeBSD 9 x64 but with built in x11). > > A quick test showed a clean box with just

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Daniel Gaspary
On Sun, Mar 17, 2013 at 12:07 AM, 印場 乃亜 wrote: > On 2013/03/17, at 11:37, Flávio Etrusco wrote: >> Daniel, I find this hack as ingenious as atrocious ;-) >> But thinking about it a bit, when FPC gets generic methods you can >> make this kind of workable! I was thinking about this, not specifical

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Flávio Etrusco
> Actually the only thing that makes me uncomfortable about the keyword "as", > is that > it strangely reminds me of SQL. I suppose that isn't a bad thing though. No problem with SQL, but "as" is already safe typecast, remember? ;-) -Flávio ___ fpc-pa

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread 印場 乃亜
Hi, On 2013/03/17, at 11:37, Flávio Etrusco wrote: > > No, he's saying that *his hack* using class helper wouldn't cover this > case (two objects in the same 'with' clause). > Well, more to the point, it only works with OOP. I use WITH on structures, etc. all the time, so ... yes implementing

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread 印場 乃亜
Hi, Also with using the "longobj" below, you have to declare it first (yet more manual temporary/helper variables). Also, once you do that, you don't need with as much to begin with since you could use a single char. variable name. BTW, I don't think Daniel was suggesting that we actually use

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Flávio Etrusco
On Sat, Mar 16, 2013 at 10:14 PM, Xiangrong Fang wrote: >> > I don't know what's make it complex if there are 2 or more subject in >> > the with? >> >> Context. A conflict case the two object were of the same class. > > > Are you saying this case: > > with MyClassInstance1 as m, MyClassInstance2

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Xiangrong Fang
> > > I don't know what's make it complex if there are 2 or more subject in > the with? > > Context. A conflict case the two object were of the same class. > Are you saying this case: with MyClassInstance1 as m, MyClassInstance2 do begin m.Property1 := 123; Property2 := 456; end; Here you d

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Daniel Gaspary
On Sat, Mar 16, 2013 at 7:55 PM, Xiangrong Fang wrote: > I don't think a class helper is worth for this stuff, if I need to write a > helper I would rather do this: I am not sure that I understand your point. The Class helper was a way to show how it's possible. And with that helper, ALL objects

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Xiangrong Fang
shiruba 's example is better than mine, and was exactly the reason I posted this suggestion. I don't think a class helper is worth for this stuff, if I need to write a helper I would rather do this: longobj := BigLongThingIDontWantToWriteOutEverySingleTime; With longobj do begin Height := 100;

RE: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-16 Thread Justin Smyth
I have downloaded openocd and will install it and setup the gdb side of it. Not sure when could be today or tomorrow -Original Message- From: "Michael Ring" Sent: ‎17/‎03/‎2013 1:09 AM To: "FPC-Pascal users discussions" Subject: Re: [fpc-pascal] [OT] Pascal compiler for embedded platf

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Daniel Gaspary
On Sat, Mar 16, 2013 at 3:02 PM, 印場 乃亜 wrote: > With BigLongThingIDontWantToWriteOutEverySingleTime do > begin > Height := 100; > Width := 200; > ... > SomeOtherObject.Submit(BigLongThingIDontWantToWriteOutEverySingleTime); > end; > > Notice how I have to write the long thin

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread 印場 乃亜
Hi, I also think this would be useful, but for other reasons, often times I end up with code like the following: With BigLongThingIDontWantToWriteOutEverySingleTime do begin Height := 100; Width := 200; ... SomeOtherObject.Submit(BigLongThingIDontWantToWriteOutEverySingleTim

[fpc-pascal] test

2013-03-16 Thread patspiper
pls ignore ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] fpcup for FreeBSD

2013-03-16 Thread Reinier Olislagers
(Cross posted: FPC+Laz lists) Hi all, I've updated the fpcup automatic FPC+Laz installer from svn for FreeBSD. Tested on PC BSD, (similar to FreeBSD 9 x64 but with built in x11). A quick test showed a clean box with just fpcup will install Laz trunk+FPC fixes_2.6 well. Of course fpcup can be ad

Re: [fpc-pascal] Re: fcl-xml

2013-03-16 Thread dev . dliw
Hi, > If you need xpath, you might also want to look at my Internet Tools ( > (http://benibela.de/sources_en.html#internettools), they contain a basically > complete XPath 2 implementation I already implemented all I need with fcl-xml, but thanks for the hint anyway. :) d.l.i.w

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Xiangrong Fang
Sorry, the email was interrupted, but sent by the phone in background... So the decision of this "feature" is that it is not worth to add, right? Thanks. 2013/3/16 Xiangrong Fang > In my example, you can use Items[], but in my real project it is a record > with > > > 发送自魅族MX > > 原始邮

Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-16 Thread Michael Ring
Those two links may help: The first article references the 2nd: http://www.eevblog.com/forum/beginners/help-on-arm-cortex-m3-development-tools-ide/20/?wap2 https://github.com/mossmann/hackrf/wiki/LPC43xx-Debugging Michael Am 16.03.13 03:13, schrieb Justin Smyth: I'm using a LPC 1343 Microcont

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Xiangrong Fang
In my example, you can use Items[], but in my real project it is a record with 发送自魅族MX 原始邮件 发件人:Sven Barth 时间:3月16日 17:12 周六 收件人:FPC-Pascal users discussions 主题:Re: [fpc-pascal] a proposal about "with" syntax >Am 16.03.2013 07:14 schrieb "Xiangrong Fang" : >> >> Suppose I h

RE: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-16 Thread Justin Smyth
Arm cortex m3 lpc 1343 32 bit Board from wave share -Original Message- From: "Rainer Stratmann" Sent: ‎16/‎03/‎2013 6:28 AM To: "FPC-Pascal users discussions" Subject: Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms What kind of controller? Atmel AVR 8 bit? ARM 32 bit? Fo

Re: [fpc-pascal] FreeBSD failure compiling fpdoc 2.7.1

2013-03-16 Thread Graeme Geldenhuys
On 2013-03-15 18:08, Marco van de Voort wrote: > > You install using the bootstrap compiler, not the generated one. OK, I changed the 'gmake install' in my scrip to use the generated compiler. It made no difference. > my script: I used your script (nice by the way), and it produced the exact

Re: [fpc-pascal] FreeBSD failure compiling fpdoc 2.7.1

2013-03-16 Thread Graeme Geldenhuys
On 2013-03-15 16:40, Pierre Free Pascal wrote: > > So often I end up with > BASE_271_DIR/lib/fpc/2.7.1 > but also > BASE_271_DIR/lib/fpc/2.6.0 > which contains the newly installed linraries... No, that is not the case. I only have a lib/fpc/2.7.1/ directory tree. My build script was posted i

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-16 Thread Sven Barth
Am 16.03.2013 07:14 schrieb "Xiangrong Fang" : > > Suppose I have the following class: > > type > TMyClass = class > public > property Caption: string read FCaption write FCaption; > property Items[Index: Integer]: string read GetItem write SetItem; default; > function Count: Intege

Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-16 Thread Justin Smyth
I've had a quick read of http://j-software.dk/stm32f103.php , for the fpc part i kinda get what to do , i want to be able to debug code on the fly as in when its running on my board using the STLINK V2... so i assume i would have to setup lazarus gdb to do this , is this correct ? if so how.

Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-16 Thread Rainer Stratmann
May be you can use STM32F... That works for me with FPC. http://j-software.dk/stm32f103.php Am Saturday 16 March 2013 03:13:52 schrieb Justin Smyth: > I'm using a LPC 1343 Microcontroller unit from waveshare, basically its a > Cortex M3. > > the link for the board is - > http://www.wvshare.com/pr