Jump to content

Search the Community

Showing results for tags 'pas2js'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. Kryvich

    Pas2js for Delphi

    I have made an adaptation of Pas2js for Delphi compiler. So now it's possible to compile and debug the code of this utility in Delphi IDE. If somebody interested you can find it here: https://github.com/Kryuski/pas2js-for-delphi. The original Pas2js transpiler for Free Pascal is here: http://wiki.freepascal.org/pas2js
  2. Hi, I try to adopt outstanding and free Pas2js transpiler to Delphi language. My main development IDE is Delphi CE Rio, so I decided to try a new Delphi syntax: generic collections and inline variables. And stumbled upon a runtime error. The code (simplified): program TestInlineVarForDictionary; {$APPTYPE CONSOLE} {$R *.res} uses SysUtils, Generics.Collections; procedure TestDictErr; var Dict: TDictionary<string,TObject>; begin Dict := TDictionary<string,TObject>.Create; for var item in Dict do Writeln('Key = ', item.Key, 'Name = ', item.Value.ClassName); end; procedure TestDictOK; var Dict: TDictionary<string,TObject>; item: TPair<string,TObject>; begin Dict := TDictionary<string,TObject>.Create; for item in Dict do Writeln('Key = ', item.Key, 'Name = ', item.Value.ClassName); end; begin try //!!TestDictOK; TestDictErr; except on E: Exception do begin Writeln(E.ClassName, ': ', E.Message); Write('Press Enter to continue...'); Readln; end; end; end. This program causes Exception class $C0000005 with message 'access violation at 0x0040a86e: write of address 0x0040a29e'. Can you confirm it? Is it a bug in the compiler or/and RTL, or am I misusing the new syntax? It's interesting: if you uncomment TestDictOK that does enumeration in old-style, the exception will disappear!
×