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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Periodic Table
by
Fibonacci
[
Today
at 01:11:40 am]
Problema ao Instalar BGRA...
by
Fred vS
[May 18, 2025, 11:46:48 pm]
crtbeginS.o and crtendS.o...
by
Aruna
[May 18, 2025, 11:38:30 pm]
BGRA Controls
by
Fred vS
[May 18, 2025, 11:33:52 pm]
External ACCESS VIOLATION...
by
alpine
[May 18, 2025, 11:30:10 pm]
Compiler raised internal ...
by
Fibonacci
[May 18, 2025, 10:53:17 pm]
Icon file was loaded on m...
by
n7800
[May 18, 2025, 10:26:06 pm]
PascalScada installing
by
jamie
[May 18, 2025, 10:24:44 pm]
Build mode Help button do...
by
440bx
[May 18, 2025, 10:20:17 pm]
Negative offset
by
ASerge
[May 18, 2025, 10:16:37 pm]
Feature request/suggestio...
by
440bx
[May 18, 2025, 10:15:56 pm]
64 bits and PascalScript
by
jamie
[May 18, 2025, 10:10:03 pm]
A little bug in fpsimages...
by
Roni Wolf
[May 18, 2025, 09:38:07 pm]
Please post your ptop con...
by
Crispy Lettuce
[May 18, 2025, 08:29:57 pm]
BGRAGtkBitmap
by
CM630
[May 18, 2025, 08:04:12 pm]
FPC for high-performance ...
by
Fibonacci
[May 18, 2025, 07:55:58 pm]
New version of BGRABitmap
by
circular
[May 18, 2025, 06:28:42 pm]
FPC 3.2.2 - compilerproc ...
by
Thaddy
[May 18, 2025, 05:48:02 pm]
LazUpdateManager – Lazaru...
by
babycode
[May 18, 2025, 04:38:06 pm]
WPARAM definition
by
Thaddy
[May 18, 2025, 04:16:52 pm]
FPC 3.2.2 - Align for Ans...
by
marcov
[May 18, 2025, 03:36:05 pm]
Little Red Riding Hood (t...
by
Lulu
[May 18, 2025, 03:00:19 pm]
Hnefatafl Viking-Chess(ra...
by
Jonax
[May 18, 2025, 11:50:30 am]
[SOLVED] How to "Jump To"...
by
cdbc
[May 18, 2025, 10:13:16 am]
Free Pascal for Windows o...
by
TRon
[May 18, 2025, 02:21:41 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this a bug or feature in Str()? (Read 2177 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