Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2020-09

how to create or read files

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mgr. Janusz Chmiel

I have found out, that I can not simply type
var
f: text;
or
file of text;
Does Pas2js support reading or writing to The files? Or currently it is not possible?
If yes, which unit or commands or similar keywords can be used for such tasks?
For debugging, it will be very useful to use files to monitor some variables changes.

Reply by email

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote 7 lines
I have found out, that I can not simply type var f: text; or file of text; Does Pas2js support reading or writing to The files? Or currently it is not possible?

No, it is not possible. That is why I created the browserconsole.

If yes, which unit or commands or similar keywords can be used for such tasks? For debugging, it will be very useful to use files to monitor some variables changes.

Write to the console log:
writeln()
or use the native console element for it:
console.log()

Michael

Reply by email