相关疑难解决方法(0)

for循环括号内的两个分号

我定制了一个我在互联网上找到的代码(这是adafruit的推文收据).我无法理解代码的许多部分,但最令我困惑的是括号内有两个分号的for循环

boolean jsonParse(int depth, byte endChar) {
  int c, i;
  boolean readName = true;

  for(;;) {  //<---------
    while(isspace(c = timedRead())); // Scan past whitespace
    if(c < 0) return false; // Timeout
    if(c == endChar) return true; // EOD

    if(c == '{') { // Object follows
      if(!jsonParse(depth + 1, '}')) return false;
      if(!depth) return true; // End of file
      if(depth == resultsDepth) { // End of object in results list
Run Code Online (Sandbox Code Playgroud)

什么是对(;;)是什么意思?(这是一个arduino程序所以我猜它在C中)

c syntax parsing for-loop arduino

25
推荐指数
2
解决办法
2万
查看次数

标签 统计

arduino ×1

c ×1

for-loop ×1

parsing ×1

syntax ×1