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
WIKI Timeout issues
Please read here if you have trouble connecting to the wiki
Recent
Free Pascal ncurses TUI
by
cdbc
[
Today
at 10:07:27 pm]
WinInet compiling errors.
by
440bx
[
Today
at 10:07:14 pm]
Lazarus Release 4.0
by
JuhaManninen
[
Today
at 09:35:05 pm]
How to fix "Warning: Enco...
by
ecm
[
Today
at 09:20:42 pm]
BGRA Controls
by
alan1076
[
Today
at 09:06:37 pm]
Classes vs Objects
by
TBMan
[
Today
at 08:23:08 pm]
InstallAware 2025 Sources...
by
avra
[
Today
at 08:22:27 pm]
[SOLVED] RecordCount not ...
by
1HuntnMan
[
Today
at 07:57:58 pm]
How to read shortstring f...
by
Thaddy
[
Today
at 07:32:43 pm]
Strange result (to me) fr...
by
jamie
[
Today
at 07:28:38 pm]
What WinAPI functions can...
by
Tikani93
[
Today
at 07:19:20 pm]
Fast Canvas Library V1.0
by
Gigatron
[
Today
at 07:07:54 pm]
Opencv version 4.6 C++ AP...
by
gidesa
[
Today
at 06:55:53 pm]
Hints for method name mis...
by
JuhaManninen
[
Today
at 05:36:46 pm]
SnapModbus
by
Thaddy
[
Today
at 05:00:03 pm]
Debugger fails to read da...
by
Martin_fr
[
Today
at 04:48:12 pm]
Error: Identifier not fou...
by
Thaddy
[
Today
at 04:30:14 pm]
X11Libre, finally and for...
by
Fred vS
[
Today
at 04:07:05 pm]
Strict Aliasing Rule
by
nixbody
[
Today
at 03:20:29 pm]
opinion on outlining text...
by
jamie
[
Today
at 03:17:00 pm]
TBitBtn no longer shows g...
by
jamie
[
Today
at 03:05:19 pm]
problem with the lps
by
n7800
[
Today
at 01:52:07 pm]
Exceptions en FPCUnit
by
ASerge
[
Today
at 12:54:33 pm]
Output folder?
by
gues1
[
Today
at 11:59:01 am]
I created a Hello World p...
by
LV
[
Today
at 11:50:16 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this a bug or feature in Str()? (Read 2187 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