RexxLA / NetRexx

Other
6 stars 0 forks source link

```_``` (underscore) disallowed by Java >=9; needs to be flagged by NetRexx; source still can be interpreted #59

Closed rvjansen closed 3 months ago

rvjansen commented 3 months ago

_ (underscore) disallowed by Java >=9; needs to be flagged by NetRexx; source still can be interpreted

Needs to be flagged down by NetRexx compiler because we do not like to produce Java source that cannot be compiled by the Java compilers.

remesm commented 3 months ago

Fixed by commit [cf09e0] We still allow an underscore as var name in NetRexx, java sees $_

rvjansen commented 3 months ago

Top!René.On 28 Mar 2024, at 15:51, remesm @.***> wrote: Fixed by commit [cf09e0] We still allow an underscore as var name in NetRexx, java sees $_

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

rvjansen commented 3 months ago

still have a problem with:

/* REXX */
Parse Version v
Say v
_="    -0.05625000000000000000"
Say '_='_
Say 'format(_/1, 6)' format(_/1, 6)
Say 'format(_+0, 6)' format(_+0, 6)
Say 'format(_  , 6)' format(_  , 6)
_="     0.05625000000000000000"
Say 'format(_/1, 6)' format(_/1, 6)
Say 'format(_+0, 6)' format(_+0, 6)
Say 'format(_  , 6)' format(_  , 6)
remesm commented 3 months ago

works for me. Are you sure you're using the updated code?


remesm@xps:testcases$ cat prob.nrx
/* REXX */
Parse Version v
Say v
_="    -0.05625000000000000000"
Say '_='_
Say 'format(_/1, 6)' format(_/1, 6)
Say 'format(_+0, 6)' format(_+0, 6)
Say 'format(_  , 6)' format(_  , 6)
_="     0.05625000000000000000"
Say 'format(_/1, 6)' format(_/1, 6)
Say 'format(_+0, 6)' format(_+0, 6)
Say 'format(_  , 6)' format(_  , 6)

remesm@xps:testcases$ nr prob.nrx 
NetRexx 4.07 11 Mar 2024
_=    -0.05625000000000000000
format(_/1, 6)     -0.05625
format(_+0, 6)     -0.0562500000
format(_  , 6)     -0.05625000000000000000
format(_/1, 6)      0.05625
format(_+0, 6)      0.0562500000
format(_  , 6)      0.05625000000000000000
remesm@xps:testcases$ nrc prob.nrx 
NetRexx portable processor 4.07-alpha build 2,745-20240328-1557
Copyright (c) RexxLA, 2011,2024.   All rights reserved.
Parts Copyright (c) IBM Corporation, 1995,2008.
Program prob.nrx
Compilation of 'prob.nrx' successful
remesm@xps:testcases$ java prob
NetRexx 4.07 11 Mar 2024
_=    -0.05625000000000000000
format(_/1, 6)     -0.05625
format(_+0, 6)     -0.0562500000
format(_  , 6)     -0.05625000000000000000
format(_/1, 6)      0.05625
format(_+0, 6)      0.0562500000
format(_  , 6)      0.05625000000000000000
rvjansen commented 3 months ago

yes, was mucking around with brew installs and it must have picked up something wrong. Apologies.