[Pas2js] pas2js doesn’t support -Sj

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Feb 1 11:39:10 CET 2020


On Sat, 1 Feb 2020 09:33:22 +0100 (CET)
Michael Van Canneyt <michael at freepascal.org> wrote:

> On Sat, 1 Feb 2020, Mr Bee via Pas2js wrote:
> 
> > Hi,
> > Just update my pas2js to v1.5 (trunk). It seems pas2js doesn’t
> > support -Sj option (writeable constant). Would you please support
> > it? I think writeable constant is a design mistake of Pascal
> > language by Borland that we have to deal forever. Personally, I
> > always disable it, since I knew it could be disabled. FPC should
> > disable it by default too, at least on ObjFPC mode. A constant
> > should never be writeable, ever.  
> 
> I don't understand what you want ? 
> Do you want consts to be writable or not ? You ask for a switch but
> at the same time advocate against writable const ?

-Sj was added in fpc 3.3.1 (or was it 3.1?) and enables writeables const
(default).
Mr Bee wants to disable it (-Sj-) to get read only const.

pas2js supports the directive {$writeableconst off}.
It was lacking the -Sj flag.

I added it now.

Mattias


More information about the Pas2js mailing list