如何使用<<獲取格式消息的結果來設置其他列的格式?
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()足以容納幾乎所有可能的格式。