gpt4 book ai didi

javascript - 解析错误 - JSCRIPT -> PHP

转载 作者:行者123 更新时间:2023-12-03 09:05:22 26 4
gpt4 key购买 nike

我觉得我正在看它,但是已经有一段时间了,还没有能够解决这个问题 - 尽管我知道答案将是一记耳光。我在 ); 上遇到解析错误,但无法找出原因!

public function addchange($bchange, $tstep) {
$nstate = $BodyModel->create5(
$this->fat + $tstep * $bchange->df(),
$this->lean + $tstep * $bchange->dl(),
$this->glyc + $tstep * $bchange->dg(),
$this->decw + $tstep * $bchange->dDecw(),
$this->therm + $tstep * $bchange->dtherm(),
); // this is where im getting a parse error
return $nstate;
}
<小时/>

JavaScript

    BodyModel.prototype.addchange = /*BodyModel*/ function(/*BodyChange*/ bchange, /*double*/ tstep)
{
var nstate = BodyModel.create5(
this.fat + tstep * bchange.df(),
this.lean + tstep * bchange.dl(),
this.glyc + tstep * bchange.dg(),
this.decw + tstep * bchange.dDecw(),
this.therm + tstep * bchange.dtherm()
);
return nstate;
}

最佳答案

删除 Passs 参数中的尾随逗号。

public function addchange($bchange, $tstep) {
$nstate = $BodyModel->create5(
$this->fat + $tstep * $bchange->df(),
$this->lean + $tstep * $bchange->dl(),
$this->glyc + $tstep * $bchange->dg(),
$this->decw + $tstep * $bchange->dDecw(),
$this->therm + $tstep * $bchange->dtherm()
);
return $nstate;
}

关于javascript - 解析错误 - JSCRIPT -> PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32203647/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com