小编FGP*_*P92的帖子

Javascript 类在 Chrome 上运行良好,但在 Edge 上运行不佳。为什么?

我定义了一个类(如下面的代码所示),它在 Chrome 中运行良好,但在 Edge 中运行不佳。使用Edge的调试器我得到以下错误:

SCRIPT1005:预计(出现在第 4 行和第 11 列。

你知道出了什么问题吗?提前致谢。

NB SimulationPMSM是在代码的以下部分中定义的另外两个对象。

class Event_Class {
  Flag_Play;
  Flag_Pause;
  Flag_Stop;
  Initialize() {
    this.Flag_Play = false;
    this.Flag_Pause = false;
    this.Flag_Stop = false;
  }
  Play() {
    this.Flag_Play = true;
    this.Flag_Pause = false;
    this.Flag_Stop = false;
  }
  Pause() {
    this.Flag_Play = false;
    this.Flag_Pause = true;
    this.Flag_Stop = false;
  }
  Stop(Simulation, PMSM) {
    this.Flag_Play = false;
    this.Flag_Pause = false;
    this.Flag_Stop = true;
    Simulation.Initialize();
    PMSM.Initialize();
  }
}
Run Code Online (Sandbox Code Playgroud)

html javascript

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

代码中定义的变量列表 (c++)

有人知道在 C++ 中是否有一个函数来获取代码中定义的所有变量的名称?

示例代码:

int main()
{
   double Var1;
   double Var2;
   UnknownFunction();
}
Run Code Online (Sandbox Code Playgroud)

在这种情况下,我正在搜索的函数 (UnknownFunction) 应该输出一个包含“Var1”和“Var2”的字符串向量。

先感谢您。

c++

0
推荐指数
1
解决办法
155
查看次数

标签 统计

c++ ×1

html ×1

javascript ×1