Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何声明带前导零的 2 位整数openvms
openvms
例子:
$month = 01 $month = month + 1 $write sys$output month
我希望现在是 02 月。
你没有。符号可以是字符串或整数。字符串可以在任何您想要的位置包含零或其他字符。整数只包含一个数值。
f$fao您可以使用词法函数将整数格式化为带有前导零的字符串:
f$fao
$ FormattedMonth = f$fao( "!2ZB", month )
参考:f$fao。