标签: comments

QTP/UFT - 在编辑器视图中向代码添加注释

如何通过我的操作的编辑器视图在我的代码中添加注释?我知道这是一个简单的问题,但我无法弄清楚,这对谷歌来说几乎是不可能的.

我已经尝试了一些标准的评论类型,其中没有一个有效:

  • //
  • /* */
  • #
  • --

我知道我可以为Action的Description属性添加文本,但我希望能够根据需要在代码中注释掉特定的行.

comments qtp hp-uft

-2
推荐指数
1
解决办法
6148
查看次数

在 java、javascript 和 c# 的循环中使用注释是否存在任何性能问题?

在 java、javascript 和 c# 的循环中使用注释是否存在任何性能问题?我不认为这会是个问题,但我想知道你是如何工作的。

/* 
Case 1
This is Loop for something.
a : ace
b : bee
*/
for (i=0; i<100000; i++) {
    /* 
        Case 2
        This is Loop for something.
        a : ace
        b : bee

    */
    var a = "1";
    var b = "2";
}
Run Code Online (Sandbox Code Playgroud)

javascript c# java comments conventions

-3
推荐指数
1
解决办法
125
查看次数

C/C++ 中不允许嵌套注释。但是,当您尝试将一对注释放入另一对注释时,以下错误意味着什么?

考虑 Lippman 的“C++ Primer”中的以下代码,

#include <iostream>

/*
* comment pairs /*   */ cannot nest.
* "cannot nest" is considered source code,
* as is the rest of the program
*/

int main(){
return 0;
}
Run Code Online (Sandbox Code Playgroud)

编译时,

 $cl -EHsc .\Program.cc
 Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30706 for x86
 Copyright (C) Microsoft Corporation.  All rights reserved.
 
 Program.cc
 .\Program.cc(4): error C4430: missing type specifier - int assumed. Note: C++ does not 
 support default-int
 .\Program.cc(4): error C2146: syntax error: missing ';' before identifier …
Run Code Online (Sandbox Code Playgroud)

c c++ comments

-3
推荐指数
1
解决办法
361
查看次数

Java - 否则如果没有if?

嘿,所以我在添加注释之前使用了这个Java程序,但是现在我收到了一个错误,其中if和else语句说他们没有if,这些注释是否干扰了如何读取if语句?任何帮助深表感谢.

/**
  * A class that takes 2 different times in military time as input and 
  * outputs the difference in hours and minutes.
  *
  * @author Name
  */
import java.util.Scanner;
public class Assignment1Q3
{
    public static void main(String[] args) 
    { 
    Scanner in = new Scanner(System.in);
    System.out.print("Please enter the first time: ");
    int fTime = in.nextInt();
    System.out.print("Please enter the second time: ");
    int lTime = in.nextInt();
    int tDifference = Math.abs(fTime - lTime);//Calculates the absolute difference.
    String strTDiff = String.valueOf(tDifference);//Converts the …
Run Code Online (Sandbox Code Playgroud)

java comments if-statement

-5
推荐指数
1
解决办法
978
查看次数

禁用JavaScript中的行

在PHP中,我可以使用#//或禁用代码行/* disabled codes */.

我们如何在JS中做到这一点?

javascript comments

-6
推荐指数
2
解决办法
3374
查看次数

标签 统计

comments ×5

java ×2

javascript ×2

c ×1

c# ×1

c++ ×1

conventions ×1

hp-uft ×1

if-statement ×1

qtp ×1