PAS2JS-3.2.2(1)

πŸ“¦
version 3.2.2 Β· 5 versions
, in ubuntu stonking

✨ pas2js-3.2.2 β€” the Free Pascal Compiler girlies πŸ’…

okay bestie, sit DOWN, because we're talking about a whole manual page here. This is the man page for pas2js-3.2.2 from the Free Pascal Compiler crew, and no cap, it's a lot β€” but we're gonna get through it together, every single flag, every single letter, nothing skipped. 🫢


🌸 NAME 🌸

pas2js-3.2.2 β€” a Pascal to JavaScript translator, built on top of the Free Pascal Compiler (FPC). it's giving "your Pascal, but make it browser". iconic, honestly. πŸ‘‘


πŸ’– SYNOPSIS πŸ’–

pas2js-3.2.2

that's it. that's the whole synopsis. she simply runs. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

Pas2JS Compiler version 1.5.1 [2026/07/09] for Linux x86_64 β€” Copyright Β© 2019 Free Pascal team. periodt, that's the official word. πŸ“œ

and like, the whole vibe is: you feed her a Pascal file, she gives you JavaScript:

<your.pas>

main character energy fr fr. πŸ’œ


πŸŽ€ OPTIONS πŸŽ€

okay so first, the little rule that applies to ALL the boolean-switch girlies: put + after a boolean switch option to turn it ON, and - to turn it OFF. remember that, it comes back constantly. 🧠✨

  • @<x> β€” read compiler options from the file <x>, on top of (in addition to) the default pas2js.cfg. like an extra lil config bestie. πŸ“„
  • -B β€” rebuild everything. all of it. from scratch. a fresh start, a rebirth, a slay. πŸ”₯
  • -d<x> β€” defines the symbol <x>. optional flex: -d<x>:=<value>. 🌈
  • -i<x> β€” write info and then halt. <x> is a combo of these letters:
    • -iD β€” write compiler date
    • -iSO β€” write compiler OS
    • -iSP β€” write compiler host processor
    • -iTO β€” write target platform
    • -iTP β€” write target processor
    • -iV β€” write short compiler version
    • -iW β€” write full compiler version
    • -ic β€” write the list of supported JS processors you can use with -P<x>
    • -im β€” write the list of supported modeswitches you can use with -M<x>
    • -io β€” write the list of supported optimizations you can use with -Oo<x>
    • -it β€” write the list of supported targets you can use with -T<x>
    • -iJ β€” write the list of supported JavaScript identifiers -JoRTL-<x>
  • -C<x> β€” code generation options. <x> is a combination of these letters:
    • o β€” overflow checking of integer operations
    • r β€” range checking
    • R β€” object checks. verifies method calls and object type casts. she's watching. πŸ‘€
  • -F... β€” set file names and paths, the whole suite:
    • -Fe<x> β€” redirect output to the file <x>. UTF-8 encoded, obviously. πŸ’…
    • -FE<x> β€” set the main output path to <x>
    • -Fi<x> β€” add <x> to the include paths
    • -FN<x> β€” add <x> to namespaces. namespaces with a trailing - get removed. Delphi calls this flag "unit scope names", fyi iykyk. 🏷️
    • -Fu<x> β€” add <x> to the unit paths
    • -FU<x> β€” set the unit output path to <x>
  • -I<x> β€” add <x> to the include paths. literally identical to -Fi, same thing bestie. πŸͺž
  • -J... β€” the extra options of pas2js, her bonus round:
    • -Jc β€” write all JavaScript concatenated into the output file
    • -Je<x> β€” encode messages as <x>.
    • -Jeconsole β€” Console codepage. this is the default.
    • -Jesystem β€” System codepage. on non-Windows, console and system are the same thing.
    • -Jeutf-8 β€” Unicode UTF-8. this is the default when you use -Fe.
    • -JeJSON β€” output compiler messages as JSON. logo etc are outputted as-is.
    • -Ji<x> β€” insert the JS file <x> into the main JS file. e.g. -Jirtl.js. can be given multiple times. to remove a file name, append a minus, e.g. -Jirtl.js-. βœ‚οΈ
    • -Jl β€” lower case identifiers
    • -Jm β€” generate source maps
    • -Jmsourceroot=<x> β€” use x as "sourceRoot", the prefix URL for source file names.
    • -Jmbasedir=<x> β€” write source file names relative to directory x, default is the map file folder.
    • -Jminclude β€” include Pascal sources in the source map.
    • -Jmabsolute β€” store absolute filenames, not relative.
    • -Jmxssiheader β€” start the source map with XSSI protection )]}', default.
    • -Jm- β€” disable generating source maps
    • -Jo<x> β€” enable or disable an extra option. the x is case insensitive:
      • -JoSearchLikeFPC β€” search source files like FPC, default: search case insensitive.
      • -JoUseStrict β€” add "use strict" to modules, default.
      • -JoCheckVersion- β€” do not add rtl version check, default.
      • -JoCheckVersion=main β€” insert rtl version check into main.
      • -JoCheckVersion=system β€” insert rtl version check into the system unit init.
      • -JoCheckVersion=unit β€” insert rtl version check into every unit init.
      • -JoRTL-<y>=<z> β€” set RTL identifier y to the value z. see -iJ.
    • -Jr<x> β€” control writing of resource string file
      • -Jrnone β€” do not write resource string file
      • -Jrunit β€” write resource string file per unit, with all resource strings
      • -Jrprogram β€” write resource string file per program, with all used resource strings in the program
    • -Jr<x> β€” control writing of linked resources
      • -JRnone β€” do not write resources
      • -JRjs β€” write resources in Javascript structure
      • -JRhtml[=filename] β€” write resources as preload links in an HTML file (default is projectfile-res.html)
    • -Jpcmd<command> β€” run a postprocessor. for each generated js, execute the command, passing the js as stdin and reading the new js from stdout. this option can be added multiple times to call several postprocessors in succession. πŸ’«
    • -Ju<x> β€” add <x> to foreign unit paths. foreign units are not compiled.
    • -JU β€” this pas2js does not support PCU files. nope, not a thing here. πŸ’€
  • -l β€” write logo. branding matters. πŸŽ€
  • -M<x> β€” set the language mode or enable/disable a modeswitch
    • -MDelphi β€” Delphi 7 compatibility mode
    • -MObjFPC β€” FPC's Object Pascal compatibility mode (default)
    • -M<x> β€” enable or disable a modeswitch, see option -im

each mode (as listed above) enables its own default set of modeswitches. other modeswitches are disabled and need to be enabled one by another. so like, one at a time, we go girl by girl. πŸ’ƒ

  • -NS<x> β€” obsolete: add <x> to namespaces. same as -FN<x>. she's old, show her respect anyway. 🫢
  • -n β€” do not read the default config files
  • -o<x> β€” change the main JavaScript file to <x>. . means stdout. πŸ‘€
  • -O<x> β€” optimizations:
    • -O- β€” disable optimizations
    • -O1 β€” level 1 optimizations (quick and debugger friendly)
    • -Oo<x> β€” enable or disable an optimization. the x is case insensitive:
      • -OoEnumNumbers[-] β€” write enum value as a number instead of a name. default in -O1.
      • -OoRemoveNotUsedPrivates[-] β€” default is enabled
      • -OoRemoveNotUsedDeclarations[-] β€” default enabled for programs with -Jc
  • -P<x> β€” set the target processor. case insensitive:
    • -Pecmascript5 β€” default
    • -Pecmascript6
  • -S<x> β€” syntax options. <x> is a combination of these letters:
    • 2 β€” same as -Mobjfpc (default)
    • a β€” turn on assertions
    • c β€” support operators like C (*=,+=,/= and -=)
    • d β€” same as -Mdelphi
    • j β€” allows typed constants to be writeable (default)
    • m β€” enables macro replacements
  • -SI<x> β€” set the interface style to <x>
    • -SIcom β€” COM, reference counted interface (default)
    • -SIcorba β€” CORBA interface
  • -T<x> β€” set the target platform
    • -Tbrowser β€” default
    • -Tnodejs β€” add pas.run(), includes -Jc
  • -u<x> β€” undefines the symbol <x>. bye girl. πŸ‘‹
  • -v<x> β€” be verbose. <x> is a combination of these letters:
    • e β€” show errors (default)
    • w β€” show warnings
    • n β€” show notes
    • h β€” show hints
    • i β€” show info
    • l β€” show line numbers, needs -vi
    • a β€” show everything
    • 0 β€” show nothing (except errors)
    • b β€” show file names with full path
    • c β€” show conditionals
    • t β€” show tried/used files
    • d β€” show debug notes and info, enables -vni
    • q β€” show message numbers
    • x β€” show used tools
    • v β€” write pas2jsdebug.log with lots of debugging info
    • z β€” write messages to stderr, -o. still uses stdout.
  • -vm<x>,<y> β€” do not show messages numbered <x> and <y>. silence, bestie. 🀫
  • -? β€” show this help
  • -h β€” show this help

also, real talk: the environment variable PAS2JS_OPTS is parsed after the default config and before the command line parameters. so she gets a lil say before your terminal does. 🌈

🧚 Macros 🧚

the format is $Name, $Name$ or $Name(). pick your fave, they all work:

  • $Pas2jsFullVersion: major.minor.release<extra>
  • $Pas2jsVersion: major.minor.release
  • $CfgDir: use within a config file. the directory of this config file
  • $Env(): environment variable, e.g. $Env(HOME)

🌟 SEE ALSO 🌟

the full documentation for pas2js-3.2.2 is maintained as a Texinfo manual. if the info and pas2js-3.2.2 programs are properly installed at your site, this command:

info pas2js-3.2.2

should give you access to the complete manual. go read her, she's thorough. πŸ“–πŸ’–


and that's the whole page bestie, no notes. this was the pas2js-3.2.2 man page from July 2026 β€” the July 2026 edition, brought to you by the Free Pascal Compiler girlies. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from