Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
Pas2JS
»
Is this a bug or feature in Str()?
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Error installation lazaru...
by
young_nandy
[
Today
at 03:48:25 am]
Help with task using arra...
by
lucamar
[
Today
at 02:57:49 am]
LAMW: Linux crash in emul...
by
iru
[
Today
at 02:39:50 am]
cdecl - conventions instr...
by
AlanTheBeast
[
Today
at 02:05:38 am]
Executing build commands ...
by
ASBzone
[
Today
at 01:49:01 am]
LAMW: jMsSqlJDBCConnectio...
by
jmpessoa
[
Today
at 01:29:03 am]
Using WebSockets with Laz...
by
PierceNg
[
Today
at 01:21:06 am]
problem executting tproce...
by
Martin_fr
[
Today
at 01:11:16 am]
Are there any existing vn...
by
willbprog9933
[March 02, 2021, 11:19:57 pm]
Copy the contents of a po...
by
jamie
[March 02, 2021, 10:46:41 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this a bug or feature in Str()? (Read 805 times)
engkin
Hero Member
Posts: 2527
Is this a bug or feature in Str()?
«
on:
May 31, 2019, 07:51:56 am »
The following project (attached) prints "undefined" in the debug console:
Code: Pascal
[Select]
[+]
[-]
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]
[+]
[-]
<!DOCTYPE html>
<HTML
>
<head
>
<meta
charset
=
"utf-8"
/>
<Title
>
str bug
</Title
>
<script
src
=
"strbug.js"
type
=
"application/javascript"
>
</script
>
</head
>
<body
>
<div
id
=
"pasjsconsole"
style
=
"width: 640px; height: 480px;"
>
</div
>
<script
>
document.addEventListener("DOMContentLoaded", function(event) {
rtl.run();
});
</script
>
</body
>
</HTML
>
Bug or feature?
Logged
engkin
Hero Member
Posts: 2527
Re: Is this a bug or feature in Str()?
«
Reply #1 on:
May 31, 2019, 03:35:48 pm »
Nevermind, it is a browser issue.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
Pas2JS
»
Is this a bug or feature in Str()?
TinyPortal
© 2005-2018