public void writeVariable(CycVariable cycVariable)
                     throws IOException {
    if (trace == API_TRACE_DETAILED) {
      Log.current.println("writeVariable = " + cycVariable.toString());
    }
    final String name = cycVariable.toString();
    if (cycVariable.isHLVariable()) {
      write(CFASL_COMPLETE_VARIABLE);
      writeInt(cycVariable.hlVariableId.intValue());
      writeString(name);
    }
    else {
      write(CFASL_SYMBOL);
      writeString(cycVariable.toCanonicalString());
    }
  }