如何使用<<获取格式消息的结果来设置其他列的格式?
f = :Column 1 << Get Format;
// the following don't work
:Column 2 << Set Format( f );
:Column 2 << Set Property( f );
找出解决方案:
f = :Column 1 << Get Format;
Show( f );
// f = Format("Fixed Dec", 5, 1)
a = Arg( f, 1);
b = Arg( f, 2);
c = Arg( f, 3);<BR /><BR />d = Arg( f, 4);
:Column 2 << Format( a, b, c, d )
// applies the format to Column 2<BR />
如果您要求的Arg()比格式包含的更多,则Arg返回Empty()。幸运的是,将格式应用于第2列时,冗余/多余的Empty()似乎不会引起问题。
在我看来,四个Arg()足以容纳几乎所有可能的格式。