[fpc-pascal] Unicode function names

2011-10-20 Thread Mark Morgan Lloyd
Out of curiosity, I've just tried creating a function named ⍳ (Unicode character 2373, i.e. the APL iota function). FPC trunk complains Fatal: illegal character "'�'" ($E2) What is the rule here- functions must be entirely ANSI or functions must start with ANSI? -- Mark Morgan Lloyd markMLl

Re: [fpc-pascal] Unicode function names

2011-10-20 Thread michael . vancanneyt
On Thu, 20 Oct 2011, Mark Morgan Lloyd wrote: Out of curiosity, I've just tried creating a function named ⍳ (Unicode character 2373, i.e. the APL iota function). FPC trunk complains Fatal: illegal character "'???'" ($E2) What is the rule here- functions must be entirely ANSI or functions mu

Re: [fpc-pascal] Unicode function names

2011-10-20 Thread Sven Barth
Am 20.10.2011 10:04, schrieb michael.vancann...@wisa.be: On Thu, 20 Oct 2011, Mark Morgan Lloyd wrote: Out of curiosity, I've just tried creating a function named ⍳ (Unicode character 2373, i.e. the APL iota function). FPC trunk complains Fatal: illegal character "'???'" ($E2) What is the r

Re: [fpc-pascal] Unicode function names

2011-10-20 Thread Mark Morgan Lloyd
Sven Barth wrote: Am 20.10.2011 10:04, schrieb michael.vancann...@wisa.be: On Thu, 20 Oct 2011, Mark Morgan Lloyd wrote: Out of curiosity, I've just tried creating a function named ⍳ (Unicode character 2373, i.e. the APL iota function). FPC trunk complains Fatal: illegal character "'???'" (

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-20 Thread Andrew Pennebaker
2.6, eh? Awesome. I'm using the SVN trunk, but it's not working for me for some reason. I'll just wait for v2.6 then. Cheers, Andrew Pennebaker www.yellosoft.us On Thu, Oct 20, 2011 at 2:19 AM, Sven Barth wrote: > Am 19.10.2011 20:08, schrieb Andrew Pennebaker: > > Right, I tried just {$mode

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Gregory M. Turner
- Original Message - > Am 19.10.2011 20:23, schrieb Andrew Pennebaker: > > Practical uses for referencable anonymous functions: > > For such applications one uses procedure variables in pascal. > > > (map (lambda (x) (+ x 1)) '(1 2 3)) > > > > -> (2 3 4) [snip!] > I still don't see wh

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Florian Klämpfl
Am 20.10.2011 21:09, schrieb Gregory M. Turner: > > Interesting discussion -- at least for me, I didn't know Delphi had this > feature. > > In case anyone really doesn't see the point, consider that this thing: > > http://www.youtube.com/watch?v=cYw2ewoO6c4 > > has all the capabilities of O

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Gregory M. Turner
- Original Message - > Am 20.10.2011 21:09, schrieb Gregory M. Turner: > > > In case anyone really doesn't see the point, consider that this > > thing: > > > > http://www.youtube.com/watch?v=cYw2ewoO6c4 > > If anybody does not see why increasing complexity without a good > reason > sho

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Juha Manninen
2011/10/20 Florian Klämpfl > If anybody does not see why increasing complexity without a good reason > should be avoided, I recommend: > > http://www.youtube.com/watch?v=kYUrqdUyEpI > :-) There is lots of confusion about anonymous functions. The name is misleading, they are called closures in

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Juha Manninen
2011/10/20 Gregory M. Turner > Good point. I guess nothing's O(free lunch). > Yes, the downside here is that the concept is very different from any syntax in OP. It will be difficult to learn properly. Juha ___ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Florian Klämpfl
Am 20.10.2011 22:31, schrieb Juha Manninen: > > They have some very important uses, like making multithreading easier. > I copy text from Delphi help page again here because it looks so cool: The same can be done with fpc (nested if needed) procedure variables and it will be more readable (imo)?

[fpc-pascal] Why do string indices start at 1, but array indices start at 0?

2011-10-20 Thread Andrew Pennebaker
It's inconsistent and ripe for bugs. Cheers, Andrew Pennebaker www.yellosoft.us ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Why do string indices start at 1, but array indices start at 0?

2011-10-20 Thread Andrew Haines
On 10/20/11 17:43, Andrew Pennebaker wrote: > It's inconsistent and ripe for bugs. > > Cheers, > > Andrew Pennebaker > www.yellosoft.us > > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepa

[fpc-pascal] Format() directives

2011-10-20 Thread Andrew Pennebaker
In the future, could Format respect the difference between '%x' and '%X'? It's useful to use the former for lowercase hexadecimal. Cheers, Andrew Pennebaker www.yellosoft.us ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

Re: [fpc-pascal] Why do string indices start at 1, but array indices start at 0?

2011-10-20 Thread Tomas Hajny
On 20 Oct 11, at 17:43, Andrew Pennebaker wrote: > It's inconsistent and ripe for bugs. Array indices may start at any ordinal value (including e.g. characters, values of enumerated types, etc.), not just 0. Only dynamic arrays always start at 0 because that is how they have been "imported" fr

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-20 Thread waldo kitty
On 10/20/2011 11:08, Andrew Pennebaker wrote: 2.6, eh? Awesome. I'm using the SVN trunk, but it's not working for me for some reason. this is why the latest version of the compiler, 2.4.4 is the one supported ;) I'll just wait for v2.6 then. always another possibility... depending on the w

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread waldo kitty
On 10/20/2011 15:17, Florian Klämpfl wrote: Am 20.10.2011 21:09, schrieb Gregory M. Turner: Interesting discussion -- at least for me, I didn't know Delphi had this feature. In case anyone really doesn't see the point, consider that this thing: http://www.youtube.com/watch?v=cYw2ewoO6c4

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread waldo kitty
On 10/20/2011 16:35, Juha Manninen wrote: 2011/10/20 Gregory M. Turner mailto:g...@malth.us>> Good point. I guess nothing's O(free lunch). Yes, the downside here is that the concept is very different from any syntax in OP. It will be difficult to learn properly. i still fight, today, wit

Re: [fpc-pascal] Why do string indices start at 1, but array indices start at 0?

2011-10-20 Thread waldo kitty
On 10/20/2011 17:43, Andrew Pennebaker wrote: It's inconsistent and ripe for bugs. funny thing, that... i thought the same thing when looking at the proposals and requests :LOL: ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://list

Re: [fpc-pascal] Format() directives

2011-10-20 Thread waldo kitty
On 10/20/2011 17:47, Andrew Pennebaker wrote: In the future, could Format respect the difference between '%x' and '%X'? It's useful to use the former for lowercase hexadecimal. please forgive the stoopid question but, is there any real difference? in hex, f00 is the same as F00, isn't it?? __

Re: [fpc-pascal] Format() directives

2011-10-20 Thread Andrew Pennebaker
Correct. But some systems expect hex input in lowercase, and some expect it in uppercase. It would be nice if Format('%x', [s]) and Format('%X', [s]) allowed this kind of customization. For now, AnsiLowerCase(Format('%X', [s]) is a workaround. Cheers, Andrew Pennebaker www.yellosoft.us On Thu,

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Andrew Pennebaker
If anybody does not see why increasing complexity without a good reason should be avoided, I recommend: http://www.youtube.com/watch?v=kYUrqdUyEpI Lisp used for nuclear fail-safe systems

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Jürgen Hestermann
Florian Klämpfl schrieb: > If anybody does not see why increasing complexity without a good reason > should be avoided, I recommend: I agree wholeheartly. In the past Pascal was a simple still powerfull language but meanwhile it has become a catchment tank for all features of all other language

Re: [fpc-pascal] Why do string indices start at 1, but array indices start at 0?

2011-10-20 Thread Roberto P.
2011/10/21 Tomas Hajny > On 20 Oct 11, at 17:43, Andrew Pennebaker wrote: > > > It's inconsistent and ripe for bugs. > > Array indices may start at any ordinal value (including e.g. > characters, values of enumerated types, etc.), not just 0. Only > dynamic arrays always start at 0 because that i

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Florian Klaempfl
Am 21.10.2011 03:49, schrieb Andrew Pennebaker: > > Lisp used for nuclear fail-safe systems > I doubt languages without /map/ are up to the job. Great, why don't you continue to use lisp then? If pascal does not offers the language concepts you are used to, pascal is the wrong language for you.

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Juha Manninen
2011/10/21 Jürgen Hestermann > Florian Klämpfl schrieb: > > > If anybody does not see why increasing complexity without a good reason > > should be avoided, I recommend: > > I agree wholeheartly. In the past Pascal was a simple still powerfull > language but meanwhile it has become a catchment ta