I recently came across a subtle problem with semi-colon placement, when used in
*particular* v3.8 development versions (in Windows). It took me some time to
track down, and to figure out a simple test to reproduce it:
#declare VEC = <.3,.5,.7>;
#local BAR = FOO;
#declare XYZ_POS = MY_MACRO(VEC);
In versions 9811560+av591 and 9893777+av622, the above code works without a
problem. But in later versions 10013324+av645, 10064268+av691, and
10064738+av694 , the semi-colon after
causes a fatal error.
A macro is the only structure to be sensitive to this, that I have discovered so
far-- perhaps because it's one of the few code structures that, depending on
use, does not specifically need a semi-colon after its 'result'.
Maybe the later development versions 'tightened up' the rules of semi-colon use
In any case, there are two ways to fix this in the later versions:
1) Put a semi-colon after <BAR.x,BAR.y,BAR.z> but NOT after
#declare XYZ_POS = MY_MACRO(VEC)
2) REVERSE that order
In the earlier versions, semi-colons can be used in both places at once-- or
like 1) or 2) as well. (I haven't yet tried any v3.7xx to see what happens
Just something to be aware of for the future.
Post a reply to this message