【问题标题】:How do I comment out a block of code in Stan?如何在 Stan 中注释掉一段代码?
【发布时间】:2022-09-23 14:00:08
【问题描述】:

这感觉像是一个重复的问题,但我在这里或其他任何地方都找不到它!

因此,在 R 中,您可以使用 Ctrl + Shift + C/Cmd + Shift + C 注释掉一段代码。有谁知道如何在 Stan 中执行等效操作?我只知道 Stan 使用 // 代替 R\ 的 #。我试过Ctrl + Shift + //Cmd + Shift + /,但无济于事。

非常感谢您的帮助! :)

    标签: syntax comments stan


    【解决方案1】:

    您可以使用以下命令在您的 Stan 代码中创建注释:

    /* this is a comment block
    as opposed to a single
    line block */
    

    请看,https://mc-stan.org/docs/2_18/reference-manual/bracketed-comments.html

    【讨论】:

      猜你喜欢
      • 2011-02-03
      • 2010-10-15
      • 2022-12-05
      • 2017-11-24
      • 1970-01-01
      • 2011-03-10
      • 2018-11-16
      • 2015-09-30
      • 1970-01-01
      相关资源
      最近更新 更多