Recent

Author Topic: PAS2JS: Error: Not supported: pointer for Name: ^TString;  (Read 294 times)

peter.dell

  • New Member
  • *
  • Posts: 20
PAS2JS: Error: Not supported: pointer for Name: ^TString;
« on: February 18, 2025, 12:07:19 am »
Hello,

The docu mentions that pointers as "Supported syntax elements".
But compiling the following program results in "Test.pas(4,5) Error: Not supported: pointer"
Do you have any suggestions on how to fix or work around this?

Code: Pascal  [Select][+][-]
  1. program test;
  2. type TString = string;
  3. var Name:  TString;
  4. var PName: ^TString;
  5. begin
  6.   WriteLn('Works,');
  7. end.

Kind regards, Peter/JAC!

kagamma

  • New Member
  • *
  • Posts: 14
Re: PAS2JS: Error: Not supported: pointer for Name: ^TString;
« Reply #1 on: February 18, 2025, 04:27:58 am »
The documentation clearly states:

Quote
Pointer (as a reference to a class, array, record, pointer of record, or interface).

There is no mention of the string type.

Thaddy

  • Hero Member
  • *****
  • Posts: 16653
  • Kallstadt seems a good place to evict Trump to.
Re: PAS2JS: Error: Not supported: pointer for Name: ^TString;
« Reply #2 on: February 18, 2025, 07:11:11 am »
You mean pointer type. Strings are of course supported. Pointers are not.
But I am sure they don't want the Trumps back...

peter.dell

  • New Member
  • *
  • Posts: 20
Re: PAS2JS: Error: Not supported: pointer for Name: ^TString;
« Reply #3 on: February 18, 2025, 10:30:27 pm »
Thanks. So that also applies then for all pointers to other elementary types.
I was hoping there was an option. For now, I changed the copy to copy/assign the strings.

 

TinyPortal © 2005-2018