格式在 4gl 中不起作用 [ USING 子句 ]
我试图按如下方式格式化输出变量:
场景 1:
LET msg = "Roopesh Majeti here "
Empno Using "&&&&&"
Call Logmsg(msg)
在这种情况下,empno 被格式化为 5 位数字 [ 我应该说空格 ] 并显示。
场景 2:
Let c_check = "&&"
Let msg ="Roopesh Majeti here"
Empno using c_check
Call Logmsg(msg)
在这里,我的期望是,无论 c_check 的值是多少(例如 10 &'s ),那么 empno 都应该格式化为 10 个位置/空格。
但它没有按预期工作。
我在这里错过了什么吗?
I was trying to format the output variable as follows:
Scenario 1:
LET msg = "Roopesh Majeti here "
Empno Using "&&&&&"
Call Logmsg(msg)
In this scenario, the empno get formatted to 5 digits [ I should say spaces ] and gets displayed.
Scenario 2:
Let c_check = "&&"
Let msg ="Roopesh Majeti here"
Empno using c_check
Call Logmsg(msg)
Here, my expectation is that, whatever is the value of c_check [ say 10 &'s ] then the empno should be formatted to 10 positions/spaces.
But it's not working as expected.
Am I missing anything here?
你没有说出你得到了什么,这使得你很难知道它是如何不起作用的。
您有一些轻微的语法错误,常量字符串后面缺少逗号。
您没有显示
msg
或c_check
的声明;问题可能是消息被截断了吗?使用时你会得到什么:
你应该能够向我们展示一个像这样的完整程序及其输出:
You don't say what you do get, which makes it hard to know how it is not working.
You have some minor syntax errors, missing the commas after the constant strings.
You don't show the declaration of
msg
orc_check
; could the problem be that the message is being truncated?What do you get when you use:
You should be able to show us a complete program like this, and its output: