You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the changes between parrot-nqp and nqp is 'our' variables; to compensate for the changed behavior, I tried a workaround to INIT() a lexical variable and then create a sub that returns this lexical. Then export the sub from that file so I can get a similar effect as the original our.
However, the INIT is causing problems, as seen below. Getting this fixed (or providing a way to share variables between use'd files) will help unblock partcl-nqp
$ cat a.nqp
INIT {
say("INIT");
}
$ cat b.nqp
use a;
$ cat c.nqp
use a;
use b;
One of the changes between parrot-nqp and nqp is 'our' variables; to compensate for the changed behavior, I tried a workaround to INIT() a lexical variable and then create a sub that returns this lexical. Then export the sub from that file so I can get a similar effect as the original our.
However, the INIT is causing problems, as seen below. Getting this fixed (or providing a way to share variables between use'd files) will help unblock partcl-nqp
$ cat a.nqp
INIT {
say("INIT");
}
$ cat b.nqp
use a;
$ cat c.nqp
use a;
use b;
say("alive");
$ nqp --target=pir a.nqp > a.pir
$ nqp --target=pir b.nqp > b.pir
$ nqp c.nqp
INIT
error:imcc:syntax error, unexpected IDENTIFIER ('INIT')
in file './b.pir' line 1
The text was updated successfully, but these errors were encountered: