您可以用什么方式在CoffeeScript中发表评论?
文档说您可以使用三个哈希符号来启动和关闭注释块:
###
Comments
go
here
###
Run Code Online (Sandbox Code Playgroud)
我发现我有时可以使用以下两种格式
`// backticks allow for straight-JavaScript,
// but the closing backtick can't be on a comment line (I think?)
`
Run Code Online (Sandbox Code Playgroud)
有没有更简单的方法在CoffeeScript中插入简短的注释?
不要使用这种风格**
由于这得到了很多观点,我想强调一下
/* Comment goes here */
Run Code Online (Sandbox Code Playgroud)
当/*
它在自己的行上时产生MATH错误.
正如特雷弗在对这个问题的评论中指出的那样,这是一个正则表达式,而不是评论!
comments code-formatting commenting block-comments coffeescript
我正在尝试第一次学习SVG,但代码似乎与我的块注释有问题.我正在使用:
/* This is my
* block comment
*/
Run Code Online (Sandbox Code Playgroud)
当我运行我的代码时,我收到以下错误:
'return' statement outside of function
line: 116, column: 4
Run Code Online (Sandbox Code Playgroud)
这恰好发生在我的块评论之前.
只是一个感兴趣的问题:有谁知道为什么VB .NET中没有块注释功能?(除非确实存在 - 但我从未遇到过它.)
我知道单行(// ....)注释Ctrl + K + C和取消注释有键盘快捷键Ctrl + K + U.
我的问题是,是否有任何默认的键盘快捷键(/*......*/)注释和取消注释?如果有,怎么样?
如果没有定义默认块注释键盘快捷键,那么 有没有办法为此添加自己的键盘快捷键?我怎么做?
我发现很多关于评论的问题,但是没有找到任何关于块评论的说法.任何帮助表示赞赏:)
我刚刚开始使用Logstash,并想知道是否有办法在logstash配置文件中指定块注释?当我使用跨越多行的长grok模式进行测试时,它将非常有用.
在Eclipse中阻止注释样式(write /* and press Enter
)
/*
* Hello World
*/
Run Code Online (Sandbox Code Playgroud)
阻止Android Studio中的评论样式
/*
Hello World
*/
Run Code Online (Sandbox Code Playgroud)
如何使我的Android Studio块注释看起来像Eclipse中的注释?在设置中找不到任何内容.
有没有办法在C风格的块注释中包含*/?在这种情况下,将块注释更改为一系列行注释(//)不是一个选项.
以下是导致问题的评论类型的示例:
/**
* perl -pe 's/(?<=.{6}).*//g' : Limit to PID
*/
Run Code Online (Sandbox Code Playgroud) 假设我有以下代码(在C++中,但这对问题可能并不重要):
int main() {
....random code....
/*This is a comment*/
....random code....
return 0;
}
Run Code Online (Sandbox Code Playgroud)
在eclipse中,当我想通过在代码之前和之后放入/*和*/来注释掉整个代码时,注释会在第3行的"这是注释"的末尾被*/缩短,所以其余代码未被注释.
/* //<--overall comment starts here
int main() {
....random code....
/*This is a comment*/ //<--overall comment ends here
....random code....
return 0;
}
*/ //<--overall comment SHOULD end here
Run Code Online (Sandbox Code Playgroud)
任何人都知道解决这个问题的方法,或者我只需处理它或使用//评论......?
这是一个生活质量问题,可能非常简单,但是,我似乎找不到答案。
如果您开始块评论...
/*
my code here
string url = "lorumipsum....*/...lorumipsum"; <---this "*/" is closing the comment early
more code
*/
Run Code Online (Sandbox Code Playgroud)
它由字符串中的任何“*/”关闭。有办法逃避这个吗?或者我只是手动“//”该行并块注释其余部分?