Difference between revisions of "TES5Edit Scripting Functions"

Jump to navigation Jump to search
169 bytes added ,  00:46, 16 September 2016
imported>DavidJCobb
imported>DavidJCobb
Line 442: Line 442:
* TES5Edit's Pascal implementation does not appear to support the <code>With</code> statement.
* TES5Edit's Pascal implementation does not appear to support the <code>With</code> statement.
* TES5Edit's Pascal implementation does not support <code>&</code> as a prefix for suppressing keyword parsing (e.g. <code>&For</code> to refer to a variable named "For").
* TES5Edit's Pascal implementation does not support <code>&</code> as a prefix for suppressing keyword parsing (e.g. <code>&For</code> to refer to a variable named "For").
* TES5Edit's Pascal implementation does support the <code>^</code> or <code>@</code> operators. Developers wishing to use <code>TFileStream</code> must work around this using the code snippet asked about [http://stackoverflow.com/questions/1434413/writing-a-string-to-a-tfilestream-in-delphi-2010 here] (the WriteString function works as provided; apparently xEdit is using a Delphi 2007 interpreter).
* TES5Edit's Pascal implementation does support the <code>^</code> or <code>@</code> operators.
* TES5Edit's Pascal implementation has exceptionally poor support for defined classes and subclasses:
* TES5Edit's Pascal implementation has exceptionally poor support for defined classes and subclasses:
** The <code>constructor</code> keyword is not supported.
** The <code>constructor</code> keyword is not supported.
Line 460: Line 460:
* TES5Edit's Pascal implementation supports out parameters but does not handle them properly. It appears as though they always receive default values (e.g. false booleans, empty strings). Var parameters properly receive values.
* TES5Edit's Pascal implementation supports out parameters but does not handle them properly. It appears as though they always receive default values (e.g. false booleans, empty strings). Var parameters properly receive values.
* TES5Edit's Pascal implementation, while allowing you to use the << and >> operators for bitshifting, will result in values of FFFFFFFFFFFFFFFF or 0 instead an actual result. Use the shr and shl operators instead to perform working bitshifting. `FormID shr 24` for load order, etc.
* TES5Edit's Pascal implementation, while allowing you to use the << and >> operators for bitshifting, will result in values of FFFFFFFFFFFFFFFF or 0 instead an actual result. Use the shr and shl operators instead to perform working bitshifting. `FormID shr 24` for load order, etc.
* Though the class can be instantiated, it is impossible to actually use <code>TFileStream</code> properly in TES5Edit, due to the lack of support for pointers and for related classes like <code>TWriter</code>. Non-class-based methods like <code>AssignFile</code> aren't implemented. It appears that the only way to write files is through <code>TStringList</code>, which always appends a CRLF to the end of a file and is therefore totally unsuitable for writing binary data.


The reference documentation below appears to match what TES5Edit provides.
The reference documentation below appears to match what TES5Edit provides.


* [http://docwiki.embarcadero.com/Libraries/XE8/en/System.RegularExpressionsCore.TPerlRegEx TPerlRegEx], used for regular expressions.
* [http://docwiki.embarcadero.com/Libraries/XE8/en/System.RegularExpressionsCore.TPerlRegEx TPerlRegEx], used for regular expressions.
Anonymous user

Navigation menu