mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:29:27 +02:00
pas2js: doc
git-svn-id: trunk@37993 -
This commit is contained in:
parent
e7f6808c9f
commit
700b2fdb03
@ -61,6 +61,7 @@
|
||||
<a href="#enumerators">Translating enumerators</a><br>
|
||||
<a href="#functiontype">Translating function types</a><br>
|
||||
<a href="#absolute">Translating var modifier absolute</a><br>
|
||||
<a href="#assert">Translating assert()</a><br>
|
||||
<a href="#calljavascript">Calling JavaScript from Pascal</a><br>
|
||||
<a href="#asm">The asm block</a><br>
|
||||
<a href="#assembler">The procedure modifier assembler</a><br>
|
||||
@ -167,6 +168,7 @@ Put + after a boolean switch option to enable it, - to disable it
|
||||
-Pecmascript5 : default
|
||||
-Pecmascript6
|
||||
-S<x> : Syntax options. <x> is a combination of the following letters:
|
||||
a : Turn on assertions
|
||||
c : Support operators like C (*=,+=,/= and -=)
|
||||
d : Same as -Mdelphi
|
||||
2 : Same as -Mobjfpc (default)
|
||||
@ -1845,6 +1847,13 @@ rtl = {
|
||||
The modifier is currently only supported for local variables.
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2 id="assert">Translating assert()</h2>
|
||||
The Assert(boolean[,string]) function is translated to <i>if(bool) throw x</i>.
|
||||
If unit sysutils is used, it creates an EAssertFailed exception.<br>
|
||||
Otherwise it throws a string.
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2 id="calljavascript">Calling JavaScript from Pascal</h2>
|
||||
Pas2js allows to write low level functions and/or access a JavaScript library
|
||||
|
Loading…
Reference in New Issue
Block a user