HP-42S / Free42 Extension for Visual Studio Code

General discussion about calculators, Swiss Micros or otherwise
Post Reply
Thomas Okken
Posts: 492
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

HP-42S / Free42 Extension for Visual Studio Code

Post by Thomas Okken » Sun Nov 04, 2018 4:17 pm

An Extension for editing HP-42S / Free42 code in Visual Studio Code has been made available in the Visual Studio Marketplace: https://marketplace.visualstudio.com/it ... 42s-free42

I haven't tried it myself, but the previews look promising.

Written by Jochen Heilingbrunner; requires VSC 1.27 or later; free download.

User avatar
ijabbott
Posts: 113
Joined: Fri Dec 15, 2017 1:34 pm
Location: Manchester, UK

Re: HP-42S / Free42 Extension for Visual Studio Code

Post by ijabbott » Sun Nov 04, 2018 6:14 pm

That looks useful, although I haven't tried it yet. I like the included command help.

I wonder how it handles double quotes and comment characters in strings? I don't really like the "Greedy comments" switch that grsbanks used for his online translator, although I understand his reasons for implementing it.

Heilingbrunner
Posts: 3
Joined: Mon Nov 05, 2018 3:02 pm
Location: Germany

Re: HP-42S / Free42 Extension for Visual Studio Code

Post by Heilingbrunner » Tue Nov 06, 2018 1:05 pm

ijabbott wrote:
Sun Nov 04, 2018 6:14 pm
That looks useful, although I haven't tried it yet. I like the included command help.

I wonder how it handles double quotes and comment characters in strings? I don't really like the "Greedy comments" switch that grsbanks used for his online translator, although I understand his reasons for implementing it.
Hi ijabbott

i checked your concerns and debugged it.

Test:
" @ no comment " @ a comment
" # no comment " # a comment
" // no comment " // a comment

Thanks.

User avatar
ijabbott
Posts: 113
Joined: Fri Dec 15, 2017 1:34 pm
Location: Manchester, UK

Re: HP-42S / Free42 Extension for Visual Studio Code

Post by ijabbott » Wed Nov 07, 2018 10:45 pm

Heilingbrunner wrote:
Tue Nov 06, 2018 1:05 pm
ijabbott wrote:
Sun Nov 04, 2018 6:14 pm
That looks useful, although I haven't tried it yet. I like the included command help.

I wonder how it handles double quotes and comment characters in strings? I don't really like the "Greedy comments" switch that grsbanks used for his online translator, although I understand his reasons for implementing it.
Hi ijabbott

i checked your concerns and debugged it.

Test:
" @ no comment " @ a comment
" # no comment " # a comment
" // no comment " // a comment

Thanks.
Great! But does it support double quotes inside strings?

Heilingbrunner
Posts: 3
Joined: Mon Nov 05, 2018 3:02 pm
Location: Germany

Re: HP-42S / Free42 Extension for Visual Studio Code

Post by Heilingbrunner » Fri Nov 09, 2018 9:37 am

Hi,

i tried this example
02 "A "c" B"
which gives
'A "c" B'
F7 41 20 22 63 22 20 42

The problem are odd numbers of double quotes. This problem have many languages. The syntax highligthing gets a problem by odd number of double quotes.

Heilingbrunner
Posts: 3
Joined: Mon Nov 05, 2018 3:02 pm
Location: Germany

Re: HP-42S / Free42 Extension for Visual Studio Code

Post by Heilingbrunner » Sun Nov 18, 2018 8:11 am

Now with debugged multi program support.
demo.gif
demo.gif (124.62 KiB) Viewed 412 times

Post Reply