如何在 pdl2 shell 中添加注释行
我正在使用 pdl2,即交互式 perl pdl shell,我想在行中添加注释来记录下一个代码行,以便稍后查看我的交互式会话。
pdl> # this is a comment
Can't exec "this": No such file or directory at /homes/pmg/pmg-soft/local-perl/local-lib/lib/perl /x86_64-linux/PDL/Perldl2/Plugin/PDLCommands.pm line 51.
是否可以在 pdl2 shell 中添加注释?
PS:声望1500的人可以添加pdl2标签吗?
[更新]
好吧,“#”确实是我所想的注释符号,但似乎你不能以 # 开头,除非你在前面放了一个 sp (或类似的东西)。 ?!这是一个“功能”吗?
pdl> # d
Can't exec "d": No such file or directory at /homes/pmg/pmg-soft/local-perl/local-lib/lib/perl5/x86_64-linux/PDL/Perldl2/Plugin/PDLCommands.pm line 51.
pdl> # d # "note the space before the #"
pdl>
I am using pdl2, the interactive perl pdl shell, and I want to add comments in lines to document the next code line so I can review my interactive session later on.
pdl> # this is a comment
Can't exec "this": No such file or directory at /homes/pmg/pmg-soft/local-perl/local-lib/lib/perl /x86_64-linux/PDL/Perldl2/Plugin/PDLCommands.pm line 51.
Is it possible to add comments in a pdl2 shell?
PS: can someone with 1500 reputation add a pdl2 tag?
[UPDATE]
OK, '#' is indeed the comment sigil as I thought but seems that you can not start a line with # unless you put a sp (or semething) before. ?! is that a 'feature'?
pdl> # d
Can't exec "d": No such file or directory at /homes/pmg/pmg-soft/local-perl/local-lib/lib/perl5/x86_64-linux/PDL/Perldl2/Plugin/PDLCommands.pm line 51.
pdl> # d # "note the space before the #"
pdl>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自
perldoc perldl
:快速而肮脏的答案:使用
# this is a comment
(带有前导空格)From
perldoc perldl
:Quick-n-dirty answer: use
# this is a comment
(with a leading space)