Hi Roy,

thanks, fixed in *SVN 1899*.

Best Regards,
Jürgen


On 9/28/25 00:30, Roy Tobin wrote:
Hi Dr. Sauermann,

Please may I suggest a diagnostic enhancement *only* for scripting mode?
When scripting, I got tripped up by an unterminated multi-line string
literal.  I was using the three double quote method, but it may apply to
⎕INP too.

antix21:~/workspace % cat unterminated.apl
#! /usr/local/bin/apl --script --OFF
"""   # this line is three double quotes, in case hard to see
none
antix21:~/workspace % ./unterminated.apl
                                               << LOOK HERE -- no diagnostic
antix21:~/workspace %

Other utilities I tried give a helpful message in such cases, please
see below.  The variety of diagnostic messages below is interesting.
I'm considering that EOF when in scripting mode is a reliable point for
a check.  Thanks for considering this usability request.

FYI:  I released an update to https://trygnuapl.github.io/ on 27 Sep 2025.

Cheers,
Roy


antix21:/tmp % ./do
./a.awk*
awk: ./a.awk:3: v = "missing
awk: ./a.awk:3:     ^ unterminated string
awk: ./a.awk:3: v = "missing
awk: ./a.awk:3:     ^ syntax error
gcc a.c
a.c: In function ‘main’:
a.c:2:16: warning: missing terminating " character
    2 |     char s[] = "
      |                ^
a.c:2:16: error: missing terminating " character
./a.csh*
Unmatched '''.
./a.pl <http://a.pl>*
Can't find string terminator '"' anywhere before EOF at ./a.pl <http://a.pl> line 3.
./a.py*
  File "/tmp/./a.py", line 5
    k = '''
           ^
SyntaxError: EOF while scanning triple-quoted string literal
./a.sh*
./a.sh: 4: Syntax error: Unterminated quoted string

Reply via email to