To all;
OS = Ubuntu Linux 22.04
QCAD = 3.28.1
I have begun coding for a coordinate Geometry program (COGO), and the first thing I noted was ECMA implementation of JavaScript is it dose not recognize General Purpose JavaScript Keywords, such as an assignment command such as "let", as in let x = 1.5....
The objective is to create a large 2d array of point#, x, y, z, descriptions.....
Can that observation be commented on ??
Joseph1916
About General Purpose Javascript (ECMA) Syntax? [SOLVED]
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Active Member
- Posts: 36
- Joined: Wed Jul 12, 2023 2:58 pm
- Location: Florida
About General Purpose Javascript (ECMA) Syntax? [SOLVED]
Last edited by Joseph1916 on Fri Aug 18, 2023 4:33 pm, edited 1 time in total.
Re: About General Purpose Javascript (ECMA) Syntax?
You can use var instead of the scoped let which is not supported by Qt Script (Qt 5).
QJSEngine (Qt 6) has some support for let as far as I know.
QJSEngine (Qt 6) has some support for let as far as I know.
Re: About General Purpose Javascript (ECMA) Syntax?
Joseph1916, You asked that already and it was answered.
Joseph1916 wrote: ↑Tue Aug 08, 2023 8:06 pmThe reserved term "var" appears in in some of my snippets
One can use var the same way:
Code: Select all
var myValue = 1.5;
Isn't x-y-z a coordinate in 3D?Joseph1916 wrote: ↑Wed Aug 16, 2023 3:16 pmThe objective is to create a large 2d array of point#, x, y, z, descriptions.....
As input or as output to QCAD?
There is already a script of Andrew for inputting such lists.
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Wed Jul 12, 2023 2:58 pm
- Location: Florida
Re: About General Purpose Javascript (ECMA) Syntax? [SOLVED]
Thanks to Andrew and CVH...... var is working fine... I have closed this Topic, and will restart where I left off tomorrow. Thanks...
Joseph1916
Joseph1916