wcols( ) 函数示例

下面的示例在未知尺寸的窗口的最后一行,将输出信息居中对齐。

clear
do sendmesg with 'message', wcols( ), wrows( ) -1

*** sendmesg 过程 ***

procedure sendmesg
parameters gcmsg, gncol, gnrow
store (gncol - len(gcmsg))/2 to gncol
@ gnrow, gncol say gcmsg
return