Is this a bug or feature in Str()? lazarus / 76-Pas2JS ---------------------------------------------------------------------- engkin · 2019-05-31 05:51 The following project (attached) prints "undefined" in the debug console: Code: Pascal [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program strbug; {$mode objfpc}{$H+} uses web; var d: double; s: string; begin d := 3.0; str(d:2:0, s); console.log(s);end. Compiled using Pas2JS 1.4.6: ftp://ftpmaster.freepascal.org/fpc/contrib/pas2js/1.4.6/ pas2js -Jc -Jirtl.js -Tbrowser c:\pathToBugProject\strbug.pas Code: XML [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i