在 ASP Classic VBScript 上的继续行(下划线)之间添加注释
我目前正在尝试弄清楚如何在 ASP classic 的行延续语句中添加注释。我们的代码管理要求要求我们编写一个 Start 块和 End 块来标记我们进行更改的位置。例如。
旧代码
arrayName = Array("FIRST_NAME", _
,"LAST_NAME" _
,"ADDRESS"
)
新代码
arrayName = Array("FIRST_NAME" _
,"LAST_NAME" _
,"ADDRESS" _
' 2011/09/27 bob Added new column for XYZ support Start
,"NEW_COLUMN" _
' 2011/09/27 bob Added new column for XYZ support End
)
新代码会导致错误,因为下划线无法放置在注释中。无论如何,是否可以在这些行之间放置代码管理注释?只是想看看我是否错过了其他选择。我认为没有,但是你们觉得怎么样?
I am currently trying to figure out how to add comment within a line continuation statement on ASP classic. Our code management requirement requires us to write a Start block and End block to mark the place where we did a change. For example.
Old code
arrayName = Array("FIRST_NAME", _
,"LAST_NAME" _
,"ADDRESS"
)
New code
arrayName = Array("FIRST_NAME" _
,"LAST_NAME" _
,"ADDRESS" _
' 2011/09/27 bob Added new column for XYZ support Start
,"NEW_COLUMN" _
' 2011/09/27 bob Added new column for XYZ support End
)
The new code is causing an error since the underbar cannot be placed within the comment. Are there anyway to place code management comment between such lines? Just want to see if I may have missed other options. I think there is none but what do you guys/gals think?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果注释行位置对您来说非常重要,您可能需要编写自己的数组推送程序。
所以,你没有错过任何事情。这就是 VBScript 语法 的原因。
使用
下划线
,实际运行如下:这也会导致错误。
< br>
我写这篇文章是为了提供有关推入数组的想法。
If the comment line position is very important for you, you may need to write your own array push procedure.
So, you have not missed anything. This is the cause of VBScript syntax.
With
underscore
, actually runs following:And this will cause an error too.
I wrote this to giving idea about push into arrays.
请使用此注释:
您的版本控制系统将负责显示差异,因此 start 和 end 注释几乎没有用处。
Use this comment instead:
Your version control system will take care of showing the differences so there's little use for the start and end comments.