line continuation when initializing 2d waves
mph4
function foo()
Make/O foo0 = {0,1,2,\
3} // a line continuation after this comma works for 1D waves
Make/O foo1 = {{0,1,2,3},{0,1,2,3}} // here's a 2D wave
Make/O foo2 = {{0,1,2,3},{0,\
1,2,3}} // line continuation after comma: no error
Make/O foo3 = {{0,1,2,3},{0\
,1,2,3}} // line continuation before comma: no error
Make/O foo4 = {{0,1,2,3},{\
0,1,2,3} } // line continuation after braces: no error
Make/O foo5 = {{0,1,2,3},\
{0,1,2,3}} // syntax error: most readable - line continuation between elements
end
Make/O foo0 = {0,1,2,\
3} // a line continuation after this comma works for 1D waves
Make/O foo1 = {{0,1,2,3},{0,1,2,3}} // here's a 2D wave
Make/O foo2 = {{0,1,2,3},{0,\
1,2,3}} // line continuation after comma: no error
Make/O foo3 = {{0,1,2,3},{0\
,1,2,3}} // line continuation before comma: no error
Make/O foo4 = {{0,1,2,3},{\
0,1,2,3} } // line continuation after braces: no error
Make/O foo5 = {{0,1,2,3},\
{0,1,2,3}} // syntax error: most readable - line continuation between elements
end
It's only a code readability issue, but it would be nice if this could be fixed...
Interesting is also that the syntax error after comma is not general.
The following
ModifyGraph rgb=(0, 0,\
1), mode=4
end
does work.
May 29, 2017 at 01:50 pm - Permalink