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
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Trndi 16 is released
by
slicke
[
Today
at 03:06:44 am]
Clean up and build
by
n7800
[August 14, 2026, 11:03:28 pm]
[Qt5/Qt6] JPSupport-Qt: J...
by
Martin_fr
[August 14, 2026, 09:30:43 pm]
var vs out (including "co...
by
440bx
[August 14, 2026, 09:25:21 pm]
FpDebug: Bugs and API gap...
by
Martin_fr
[August 14, 2026, 09:19:49 pm]
Which Linux version
by
cdbc
[August 14, 2026, 08:57:51 pm]
'ReadStr' ?
by
PascalDragon
[August 14, 2026, 08:33:34 pm]
Cross platform DirectoryW...
by
LemonParty
[August 14, 2026, 07:41:15 pm]
Lazarus Bugfix Release 4....
by
wp
[August 14, 2026, 04:47:58 pm]
LRS Explorer
by
wp
[August 14, 2026, 04:02:45 pm]
TDWEdit
by
docno
[August 14, 2026, 03:35:02 pm]
BS Controls – Silly Compo...
by
Xenno
[August 14, 2026, 02:30:43 pm]
Separators in the compone...
by
JuhaManninen
[August 14, 2026, 01:28:05 pm]
Lazarus, Ubuntu Pi 4 and ...
by
Thaddy
[August 14, 2026, 12:07:04 pm]
Unleashed Pascal (async/a...
by
creaothceann
[August 14, 2026, 11:11:47 am]
AsyncProcess not firing O...
by
Martin_fr
[August 14, 2026, 11:05:52 am]
Is it possible to communi...
by
Xor-el
[August 14, 2026, 10:28:59 am]
How to avoid duplicates i...
by
mig-31
[August 13, 2026, 05:35:46 pm]
QGradientTrackPanel: A Fu...
by
Ed78z
[August 13, 2026, 04:49:24 pm]
Memory location
by
Thaddy
[August 13, 2026, 04:01:56 pm]
TurboBird IBX
by
laguna
[August 13, 2026, 03:55:51 pm]
TlsLib4Pascal
by
Xor-el
[August 13, 2026, 03:06:13 pm]
MR - DebuggerIntf for ter...
by
Martin_fr
[August 13, 2026, 12:54:22 pm]
AArch64, load a constant ...
by
LemonParty
[August 13, 2026, 12:31:06 pm]
Lazarus undead repository...
by
Dankan1890
[August 13, 2026, 10:28:54 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this a bug or feature in Str()? (Read 2471 times)
engkin
Hero Member
Posts: 3112
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: 3112
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