[Lazarus] Jedi Code Format barfs on an Octal number
brian
brian at meadows.pair.com
Tue Dec 17 14:04:05 CET 2013
On 12/17/2013 04:17 AM, Michael Van Canneyt wrote:
>
>
> On Tue, 17 Dec 2013, Frederic Da Vitoria wrote:
>
>> 2013/12/17 Jürgen Hestermann <juergen.hestermann at gmx.de>
>>
>> Am 2013-12-17 02:42, schrieb waldo kitty:
>> yes, but it is not available in TP/BP and (IIRC) Delphi...
>>
>>
>> I am wondering why octal numbers are not allowed in these modes.
>> Why not allow them in all modes?
>> I can't see how this would cause problems.
>> It would only avoid them.
>>
>>
>> Maybe because these modes could be used to ensure that the developer
>> is able to switch back to TP/BP or Delphi. If these modes
>> accepted features which TP/BP or Delphi don't understand, switching
>> back would become difficult. Or you could create a source
>> file which you want to be compatible with FPC and with TP. If you
>> use octal, it won't work.
>
> That is exactly the idea.
>
Which is fair enough, of course, but the formatter obviously isn't a
compiler. I cannot see a problem with JCF reformatting code which is
the *superset* of all three modes. Incompatible badly-formatted code
is certainly no less of a problem than incompatible well-formatted code!
Of course, it's a perfectly understandable problem if JCF hasn't been
tweaked in any way for FPC, as it was no doubt written with Object
Pascal as the target language. Anyway, it's hardly a problem of any
great importance, if you want to keep the modes for fpChmod readable
without requiring mental arithmetic then all I did was to rewrite &644
as (6*64)+(4*8)+4
Brian.
More information about the Lazarus
mailing list