in this case it would look like
int $currentTime = frame;
// or: int $currentTime = currentTime -q
;
float $p[] = getAttr -time ($currentTime + 1) "pCube1.translate"
;
// now since the expression already is "downgraded" to mel you can feed the locators translate attribute in one go
setAttr "locator1.translate" $p[0] $p[1] $p[2];
// or: move $p[0] $p[1] $p[2] "locator1";
// or: xform -worldSpace -translation $p[0] $p[1] $p[2] "locator1";